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
Am I able to use history outside of React components with createBrowserRouter etc. ?
From looking at the source code I can't find any escape hatches to pass the history into these v6.4 route creation functions. createRouter is not exported from @remix-run/router through react-router-dom is it?
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
-
Hey folks, FAQ has an answer for How do I access the history object outside of components if you are using
<BrowserRouter>
,<HashRouter>
,<MemoryRouter>
,<NativeRouter>
.I would like to use one of the routers that support the new v6.4 data APIs: https://reactrouter.com/en/main/routers/picking-a-router#using-v64-data-apis (like
createBrowserRouter
).Am I able to use
history
outside of React components withcreateBrowserRouter
etc. ?From looking at the source code I can't find any escape hatches to pass the history into these v6.4 route creation functions.
createRouter
is not exported from@remix-run/router
throughreact-router-dom
is it?Beta Was this translation helpful? Give feedback.
All reactions