国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

react路由報錯

2021-12-03 10:37 作者:老尚帶你學前端  | 我要投稿

react路由報錯:A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>

解決方法:

在index.js文件中,用<Routes>包圍 <Route>

修改:

<Route path='/about' component={<About/>} />

為,

<Route path='/about' element={<About/>}?

就這樣式的,

import {Route, Routes, HashRouter} from 'react-router-dom'

<Routes>

? ? ? ? ? <Route path='/about' element={<About/>} />

</Routes>


react路由報錯的評論 (共 條)

分享到微博請遵守國家法律
通许县| 富宁县| 随州市| 临沭县| 贵德县| 方正县| 彩票| 白城市| 荥经县| 白朗县| 昔阳县| 天长市| 且末县| 上饶县| 亳州市| 禄劝| 宜章县| 荥阳市| 营山县| 昭觉县| 子长县| 宿松县| 中阳县| 宝清县| 读书| 旬阳县| 南江县| 容城县| 宝兴县| 济南市| 左云县| 海阳市| 漳浦县| 磴口县| 德令哈市| 尤溪县| 余姚市| 蓬溪县| 阜宁县| 乌拉特前旗| 鄄城县|