A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/renchap/webpacker-react-example below:

renchap/webpacker-react-example: Example application using Webpacker-React

Webpacker-React sample application

This is a very basic Rails application to showcase usage of Webpacker-React.

Please read Webpacker-React documentation for more details.

First, clone this repository and install dependancies :

$ cd webpacker-react-example
$ bundle
$ ./bin/yarn

You then need to run Webpack to compile the javascript code :

Now you can run the Rails app :

Finally open http://localhost:3000/ in your browser.

Very basic React component, nothing special.

Packfiles are entrypoints for Webpacker's managed Javascript. For Webpacker-React to work, you need to import your component and register it for later use in your app.

Use the react_component() method from a view to render a previously registered component.

You can also use render react_component: 'Component' from a controller to render it.

You are encouraged to use this example application to test any development you make on the Webpacker-React code base. Please see its README for more details.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4