Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

renchap/webpacker-react-example

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Usage

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 :

$ ./bin/webpack

Now you can run the Rails app :

$ ./bin/rails server

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

Contents

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.

Development

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.

About

Example application using Webpacker-React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.