alvarofpp / react-component

A package to make it easy to manipulate your react components

Stars
0

react-component

Packagist Version
License

A package to make it easy to manipulate your react components.

Contents

Install

Install via composer:

composer require alvarofpp/react-component

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
But if you don't use auto-discovery, open the config/app.php file and add the following line to register the service provider:

'providers' => [
    // ...

    Alvarofpp\ReactComponent\ReactComponentServiceProvider::class,

    // ...
],

Usage

This package currently contains one command: make:react-component.

make:react-component

Create a new React component file.

php artisan make:react-component Users/UsersList

Will create a file called UsersList.js at resources/js/components/Users/.
To add the component in app.js, use the --require option.

Contributing

Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.