将根组件挂载到 DOM 节点上

App.jsx

import React from 'react'

class App extends React.Component {
  render() {
    return <h3>Hello</h3>
  }
}

export default App

index.js

import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'

ReactDOM.render(<App />, document.getElementById('root'))

posted on 2021-09-10 10:09  aisowe  阅读(331)  评论(0编辑  收藏  举报

导航