A laravel preset for using react with redux quickly with autoloading components.
- Install Laravel and cd to your project.
- Install this preset via
composer require abdlhaklalouche/react-redux-with-loader-preset
php artisan preset react-redux-with-loader
npm install
npm run watch
ornpm run dev
ornpm run prod
php artisan serve
to run the server.
-
To create a component or container go to
resources/js/components
orresources/js/containers
and create any component then create reducers inresources/js/components
and make the actions and store them inresources/js/actions
. -
To use that component/containers 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-redux-with-loader-preset Contributers under the MIT license.