You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is expected. When you add the useRoutes hook, you're basically adding a subscription to the location on the page. When it changes, it triggers a re-render. You can optimize around this yourself, or use Routes to do this for you.
What is the new or updated feature that you are suggesting?
1、when i use
<Routes>
,its normal ,layout render one timehttps://stackblitz.com/edit/github-xy6mxl?file=src/App.tsx
page render one time
2、when i use useRoutes()
https://stackblitz.com/edit/github-eutnsg?file=src/App.tsx
when u click link, layout will re-render every time
Why should this feature be included?
I hope use useRoutes() performance like
<Routes>
The text was updated successfully, but these errors were encountered: