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
在Createli调用会提示useNavigate() may be used only in the context of a <Router> component.
我尝试包裹一层
import { useNavigate, BrowserRouter } from '@modern-js/runtime/router';
<BrowserRouter>
...
</BrowserRouter>
则提示<Router basename="/guide"> is not able to match the URL "/detail?id=41" because it does not start with the basename, so the <Router> won't render anything.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
在Createli调用会提示
useNavigate() may be used only in the context of a <Router> component.
我尝试包裹一层
则提示
<Router basename="/guide"> is not able to match the URL "/detail?id=41" because it does not start with the basename, so the <Router> won't render anything.
Beta Was this translation helpful? Give feedback.
All reactions