diff --git a/chenxuan1/src/App.js b/chenxuan1/src/App.js index 2a97814b1..28a9e2ea3 100644 --- a/chenxuan1/src/App.js +++ b/chenxuan1/src/App.js @@ -22,10 +22,8 @@ class App extends Component{ ref-内联函数 ref-函数 createRef - 生命周期函数 github搜索demo - Confirm Todo Toast 高阶组件1 diff --git a/chenxuan1/src/pages/confirm/index.jsx b/chenxuan1/src/pages/confirm/index.jsx deleted file mode 100644 index f837446d7..000000000 --- a/chenxuan1/src/pages/confirm/index.jsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from "react"; -class App extends React.Component { - render() { - return ( -
-

Hello World

-
- ); - } -} -export default App \ No newline at end of file diff --git a/chenxuan1/src/router/index.jsx b/chenxuan1/src/router/index.jsx index 211695919..e9244a5f0 100644 --- a/chenxuan1/src/router/index.jsx +++ b/chenxuan1/src/router/index.jsx @@ -10,7 +10,6 @@ import This from "../pages/this" import Life from "../pages/life" import Hoc1 from "../pages/hoc1" import Github from "../pages/github" -import Confirm from "../pages/confirm" import Toast from "../pages/toast" const routes = [ { @@ -61,10 +60,6 @@ const routes = [ path: "/github", component: Github }, - { - path: "/confirm", - component: Confirm - }, { path: "/toast", component: Toast diff --git a/demo/confirm/src/components/index.js b/demo/confirm/src/components/index.js index 52dfafa2d..641355d26 100644 --- a/demo/confirm/src/components/index.js +++ b/demo/confirm/src/components/index.js @@ -5,7 +5,7 @@ const Confirm=(title,btnOptions)=>{ let div=document.createElement('div'); div.setAttribute('class','hehe') document.body.appendChild(div); - let confirmInt=ReactDom.render(,div); + let confirmInt=ReactDom.createRoot(,div); confirmInt.setMessage(title,btnOptions,div) } export default Confirm \ No newline at end of file