Skip to content

Instantly share code, notes, and snippets.

@kubido
Last active June 3, 2020 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kubido/ad5c3057ee6b108451503727e366f380 to your computer and use it in GitHub Desktop.
Save kubido/ad5c3057ee6b108451503727e366f380 to your computer and use it in GitHub Desktop.
Rails entry point for react webpacker application.js packs
import React from 'react'
import ReactDOM from 'react-dom'
const App = () => {
return(
<h1> Hello from React Webpacker </h1>
)
}
document.addEventListener('DOMContentLoaded', () => {
ReactDOM.render(
<App />,
document.getElementById('root'),
)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment