mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-30 11:56:22 +08:00
27 lines
654 B
JavaScript
27 lines
654 B
JavaScript
// 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.
|
|
|
|
import React from 'react'
|
|
import ReactDOM from 'react-dom'
|
|
// import PropTypes from 'prop-types'
|
|
|
|
const Settings = () => (
|
|
<div>Settings page</div>
|
|
)
|
|
|
|
// Settings.defaultProps = {
|
|
// name: 'David'
|
|
// }
|
|
|
|
// Settings.propTypes = {
|
|
// name: PropTypes.string
|
|
// }
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
ReactDOM.render(
|
|
<Settings />,
|
|
document.body.appendChild(document.createElement('div'))
|
|
)
|
|
})
|