2017-07-12 22:41:55 +08:00
|
|
|
// Run this example by adding <%= javascript_pack_tag 'hello_react' %> to the head of your layout file,
|
|
|
|
// like app/views/layouts/application.html.erb. All it does is render <div>Hello React</div> at the bottom
|
|
|
|
// of the page.
|
|
|
|
|
2017-07-31 16:42:40 +08:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import Navigation from '../shared/navigation';
|
|
|
|
import messages from '../locales/messages';
|
2017-07-12 22:41:55 +08:00
|
|
|
|
2017-07-31 16:42:40 +08:00
|
|
|
const App = () => (
|
|
|
|
<div>
|
|
|
|
<Navigation page='Settings'/>
|
|
|
|
....
|
|
|
|
</div>
|
2017-07-12 22:41:55 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
ReactDOM.render(
|
2017-07-31 16:42:40 +08:00
|
|
|
<App />,
|
2017-07-28 16:52:25 +08:00
|
|
|
document.getElementById('root')
|
2017-07-12 22:41:55 +08:00
|
|
|
)
|
|
|
|
})
|