abdlhaklalouche / react-with-loader-preset
Laravel frontend preset for react with auto lazy loader
dev-master
2019-04-05 22:26 UTC
Requires
- laravel/framework: ^5.5
This package is auto-updated.
Last update: 2024-05-06 10:45:47 UTC
README
About
A laravel preset for using react quickly with autoloading components.
Installation
- Install Laravel and cd to your project.
- Install this preset via
composer require abdlhaklalouche/react-with-loader-preset
Usage
Initializing the 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.
Using the preset
- 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 and license
Copyright 2018 Laravel react-with-loader-preset Contributers under the MIT license.