Using React with Laravel Jetstream
Laravel Jetstream is a Laravel starter kit that gives you a codebase ready to go with things like user management, teams, and two-factor login.
Officially, Jetstream only supports two stacks: Inertia (which uses Vue) or Livewire. Both are great but personally I prefer using React so here we are :)
You can view the source code for what the final product looks like here
There are a few differences but for the most part it is a 1-1 copy.
To use this in your own project, simply generate a new laravel jetstream project like normal and then run the npm command I created
$ laravel new myapp --jet --stack=inertia $ cd myapp $ npx laravel-jetstream-react install
If your app is going to use teams, make sure to use the
--teams flag for both generators
$ laravel new myapp --jet --stack=inertia --teams $ cd myapp $ npx laravel-jetstream-react install --teams
If you want to view the source code for the generator you can find it below. This repo is also where the React components live so any PR's or issues can be filed here
Hope this saves you some time!