實作 To Do List 功能時,下述的Route程式碼出現問題:
上網查了一下,因 React 版本持續更新,我使用的 React 18 需要把 component 改成 element 即可正常運作。
錯誤訊息:
錯誤訊息完整版:
Matched leaf route at location "/" does not have an element. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.
Reference:
https://blog.csdn.net/dscn15848078969/article/details/121331161
文章標籤
全站熱搜
