Permalink
Browse files

Install React JS

  • Loading branch information...
rubyhero committed Jun 30, 2018
1 parent f516e57 commit 29b95f606748af64699235392b6929dd5d512197
@@ -8,3 +8,7 @@
// layout file, like app/views/layouts/application.html.erb
console.log('Hello World from Webpacker')
// Support component names relative to this directory:
var componentRequireContext = require.context("components", true)
var ReactRailsUJS = require("react_ujs")
ReactRailsUJS.useContext(componentRequireContext)
@@ -0,0 +1,5 @@
// By default, this pack is loaded for server-side rendering.
// It must expose react_ujs as `ReactRailsUJS` and prepare a require context.
var componentRequireContext = require.context("components", true)
var ReactRailsUJS = require("react_ujs")
ReactRailsUJS.useContext(componentRequireContext)
@@ -6,7 +6,8 @@
"babel-preset-react": "^6.24.1",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-dom": "^16.4.1"
"react-dom": "^16.4.1",
"react_ujs": "^2.4.4"
},
"devDependencies": {
"webpack-dev-server": "2.11.2"

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 29b95f6

Please sign in to comment.