abdlhaklalouche/react-with-loader-preset

Laravel frontend preset for react with auto lazy loader

Downloads

15

Stars

0

Version

Laravel React With Loader Preset

About

A laravel preset for using react quickly with autoloading components.

Installation

  1. Install Laravel and cd to your project.
  2. Install this preset via composer require abdlhaklalouche/react-with-loader-preset

Usage

Initializing the preset

  1. php artisan preset react-with-loader
  2. npm install
  3. npm run watch or npm run dev or npm run prod
  4. php artisan serve to run the server.

Using the preset

  1. To create a component go to resources/js/components and create any component
  2. 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.

abdlhaklalouche

Author

abdlhaklalouche