Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

A working demo app with Rails 5.1, webpack, React, and hot reloading.

Notifications You must be signed in to change notification settings

tvararu/rails-webpack-example

Repository files navigation

Rails 5.1 webpack yarn React hot reload

… or how to write a title that looks like it was generated by a Markov chain.

This is meant to be a project that demos how to use the new webpacker integration in Rails 5.1 with React.js and hot module reloading.

What am I supposed to do with this

$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15]
$ bundle -v
Bundler version 1.14.6
$ yarn --version
0.20.3
$ git clone git@github.com:tvararu/rails-webpack-example.git
$ cd rails-webpack-example
$ bundle
$ yarn
$ bundle exec rails s
$ # open new shell
$ ./bin/webpack-dev-server --hot --inline
$ # open new shell
$ open http://localhost:3000

Edit app/javascript/components/Hello.jsx, and marvel at how the content that was dynamically rendered by JavaScript in your browser will update without a full page reload and while maintaining the application's state.

License

MIT.

About

A working demo app with Rails 5.1, webpack, React, and hot reloading.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published