Last active
June 3, 2020 03:20
-
-
Save kubido/ad5c3057ee6b108451503727e366f380 to your computer and use it in GitHub Desktop.
Rails entry point for react webpacker application.js packs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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