A laravel preset for using react quickly with autoloading components.
- Install Laravel and cd to your project.
- Install this preset via
composer require abdlhaklalouche/react-with-loader-preset
php artisan preset react-with-loader
npm install
npm run watch
ornpm run dev
ornpm run prod
php artisan serve
to run the server.
- To create a component go to resources/js/components and create any component
- To use that component without render it manualy you just have to use directive code bellow:
@react({
"path": "components/COMPONENT_FILENAME_HERE",
"loading": TRUE_OR_FALSE,
"class": "CSS_CLASSES_HERE",
"props": {
"PROPERTY_NAME": "PROPERTY_VALUE"
}
})
Copyright 2018 Laravel react-with-loader-preset Contributers under the MIT license.