Is there benefits or downsides to using composer require laravel/ui
for scaffolding a Laravel with ReactJs project instead of installing ReactJs with npm
manually and editing webpack.mix.js
mix.js('resources/js/app.jsx', 'public/js')
.react();
Is there a conventional/better way to bring ReactJS to Laravel?
- Am I likely to miss a setting if I do not use laravel/ui
- Will I be enforced to follow some absurd rules if I use laravel/ui
- Does laravel/ui really makes the setup easier.
...
CodePudding user response:
I quote from laravel/ui repo the following
This legacy package is a very simple authentication scaffolding built on the Bootstrap CSS framework. While it continues to work with the latest version of Laravel, you should consider using Laravel Breeze for new projects. Or, for something more robust, consider Laravel Jetstream.
You can see that the project maintainers recommend in a direct way using another packages.
You should also take in count that the discussed scaffolding uses Bootstrap by default.
Finally, I don't see any shortcut in running composer require laravel/ui && php artisan ui react
instead of
npm install && --save-dev react react-dom
and adding .react()
to webpack.mix