-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap 5.x #27
Comments
started branch dev-5x
|
why remove @reach/router support? Your library of course, but support for that is what brought me to this library (reach router is the required router for Gatsby since that's what it uses) |
@sirrodgepodge @reach/router is deprecated, the project will converge to react-router v6 |
But maybe it could be useful to support react-routef v6 and @reach/router at the same time... |
Is react-router v6 coming soon? What's the best choice for a router lib that's available today? |
yes we are waiting for out of beta v6 and for this pr merged |
rewritten in ts! |
removed - [x] Deprecate/remove @reach/router ? (it will converge to react-router v6) 5.x will support react-router v4/v5/v6 - reach/router v1.x - history v4/v5 |
https://github.com/salvoravida/redux-first-history/releases/tag/v5.0.0-beta.2
import { HistoryRouter as Router } from "redux-first-history/rr6";
import { Route, Routes, Navigate } from "react-router-dom";
//...
import { store, history } from "./store";
//...
<Router history={history}>
<Routes>
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/" element={<Home />} />
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</Router> demo rr6 here: https://codesandbox.io/s/redux-first-history-demo-rr6-uccuw |
Would be nice if the docs could show a configuration example with Redux Toolkit ( |
https://codesandbox.io/s/redux-first-history-demo-forked-fy1kt?file=/src/store.js It's quite easy: import { combineReducers } from "redux";
import { configureStore } from "@reduxjs/toolkit";
import { createReduxHistoryContext, reachify } from "redux-first-history";
import { createWouterHook } from "redux-first-history/wouter";
import { createBrowserHistory } from "history";
import createSagaMiddleware from "redux-saga";
import mySaga from "./sagas";
const sagaMiddleware = createSagaMiddleware();
const {
createReduxHistory,
routerMiddleware,
routerReducer
} = createReduxHistoryContext({ history: createBrowserHistory() });
export const store = configureStore({
reducer: combineReducers({
router: routerReducer
}),
middleware: [sagaMiddleware, routerMiddleware]
});
sagaMiddleware.run(mySaga);
export const history = createReduxHistory(store);
export const reachHistory = reachify(history);
export const wouterUseLocation = createWouterHook(history); |
Another question: what's the best flow for accessing router "match params" in the Redux layer? If this package makes the store the "single source of truth" for all state (including routing state), then I would like some kind of selector which retrieves url params for direct use in the Redux layer (without having to fetch them first in React components via My use-case is that I want to dispatch navigation actions, without the boilerplate of the React component having to look up and forward params that the store could already be aware of. Some guidance or docs on this would be great! |
Hello, not sure if I should open another issue or just add this here as it's related to 5.x development... hope it's the right place :-) Anyway, React Router v6 is out and they merrily removed the history prop from |
https://github.com/salvoravida/redux-first-history/releases 5.0 beta 2 already supports rr6 also the last one. I think it's time to release rfh 5.0 final as the beta is quite stable. Please give me a feedback if you test with rr6 |
import { HistoryRouter as Router } from "redux-first-history/rr6";
import { Route, Routes, Navigate } from "react-router-dom";
//...
import { store, history } from "./store";
//...
<Router history={history}>
<Routes>
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/" element={<Home />} />
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</Router> demo rr6 here: https://codesandbox.io/s/redux-first-history-demo-rr6-uccuw |
Thank you very much! import { HistoryRouter as Router } from "redux-first-history/rr6"; With that one, things are working properly. Thanks again, looking forward for the 5.0 release! 👍 |
v5.0.0 is out! let me know your feedback! |
added @reduxjs/toolkit and react-router v6 examples on the homepage! |
https://github.com/remix-run/react-router/releases/tag/v6.1.0 Finally, react-router published HistoryRouter! 🎉 |
Came here after searching what redux-first-history/src/create.ts Line 20 in 328cf16
|
https://github.com/salvoravida/redux-first-history/releases/tag/v5.0.12 |
Roadmap 5.x
This issue is a roadmap for all work on the 5.x branch.
history
v5.xreact-router
v6.xif you have any ideas... now's the time!
Let's discuss.
The text was updated successfully, but these errors were encountered: