老师,react的tab切换内容原理是什么呀?
用react-router路由实现最佳。如:你只要设置好布局就ok.
<Link to = "/">跳转到主页面去</Link>
<Link to = "/about">跳转到about页面</Link>
{/*exact 更精准定位,切换路由只包含Home*/}
<Route exact path="/" component={Home} />
<Route path="/about" component={About} />