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
e.g. react-router-dom does not re-exports browserHistory now.
also, instead of creating wrappers for every react-router function it'll be the better keep only index.js with re-exports (better for changed method readability. e.g. I want to look sources of react-router-dom for added/changed methods, I have to open all the modules in the react-router-dom/modules/index.js
now ).
browserHistory is not exported because it no longer exists. The <BrowserRouter> component creates a history object for you. If you need a custom history object, you have to create it yourself and pass it to a <Router>.
The separate files have something to do with enabling tree shaking (see Add ES build to react-router and react-router-dom (#4425) #4432 and the issue it links to). I'm not familiar enough with tree shaking to add any more information on why it was necessary.
// Excuse my beginner's English
e.g.
react-router-dom
does not re-exportsbrowserHistory
now.also, instead of creating wrappers for every
react-router
function it'll be the better keep only index.js with re-exports (better for changed method readability. e.g. I want to look sources ofreact-router-dom
for added/changed methods, I have to open all the modules in the react-router-dom/modules/index.jsnow ).
e.g. wrapper to delete:
MemoryRouter.js
e.g. how to rewrite re-exports:
react-router-dom/modules/index.js
thank you
The text was updated successfully, but these errors were encountered: