no message

This commit is contained in:
chenxuan
2024-04-18 14:20:46 +08:00
parent 55b6a6f055
commit 36071382ab
3 changed files with 30 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ class App extends Component{
<div className='mainContainer'>
<div className='nav'>
<NavLink to='/jsx' activeclassname='active' children="jsx语法"></NavLink>
<NavLink to='/fn' activeclassname='active' children="函数式组件"></NavLink>
<NavLink to='/ref1'>ref-字符串</NavLink>
<NavLink to='/ref2'>ref-内联函数</NavLink>
<NavLink to='/ref3'>ref-函数</NavLink>
+24
View File
@@ -0,0 +1,24 @@
import React from 'react';
function Hehe(){
return (
<div>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
<h1>函数式组件</h1>
</div>
)
}
class Fn extends React.Component{
render(){
return (
<Hehe/>
)
}
}
export default Fn;
+5
View File
@@ -1,4 +1,5 @@
import Jsx from '../pages/jsx'
import Fn from '../pages/fn'
import Ref1 from "../pages/ref1"
import Ref2 from "../pages/ref2"
import Ref3 from "../pages/ref3"
@@ -11,6 +12,10 @@ const routes = [
path: "/jsx",
component: Jsx
},
{
path: "/fn",
component: Fn
},
{
path: "/life",
component:Life