Skip to main content

react

是否要有默认导出

link和navlink,

navlink相比link多了一个active的功能.

多级路由嵌套

js
1
2
3
4
You rendered descendant <Routes> (or called `useRoutes()`) at "/two" (under <Route path="two">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
Please change the parent <Route path="two"> to <Route path="two/*">.

404页面控制

登录校验

关于组件中,事件处理函数使用函数表达式还是函数声明,组件简单式,函数表达式,较为复杂usecallback+usememo,