Releases: salvoravida/redux-first-history
Releases · salvoravida/redux-first-history
v5.0.5
fix jest import on rr6
v5.0.4
- Strongly type action creators (#58) (Thanks to @devzeebo)
- Adjust readme (#54) (Thanks to @sgnilreutr)
v5.0.3
- fix RouterState type propagation
v5.0.2
v5.0.2
- fix types for react-router v6.0.2
v5.0.1
- fixed npm package src missing
v5.0.0
- rewritten in TS
- add support for react-router v6 !
- tests coverage 100% !
rr6 support :
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
BREAKING CHANGES:
- removed option "oldLocationChangePayload"
v5.0.0-beta.2
- rewritten in TS
- add support for react-router v6.0.0-beta.1
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
v5.0.0-beta.1
- support
history
v5.0.0 - support
react-router
v6.0.0-alpha.1
https://github.com/ReactTraining/react-router/releases/tag/v6.0.0-alpha.1
(removed "listenObject" flag, it will autodetect rr6/history5.x
BREAKING CHANGES:
- removed oldLocationChangePayload flag
import { createReduxHistoryContext, reachify } from "redux-first-history";
import { createWouterHook } from "redux-first-history/wouter";
import { createBrowserHistory } from "history";
const { createReduxHistory, routerMiddleware, routerReducer } = createReduxHistoryContext({
history: createBrowserHistory(),
});
export const history = createReduxHistory(store);
export const reachHistory = reachify(history);
export const wouterUseLocation = createWouterHook(history);
v4.6.0-beta.1
- support
history
v5.0.0 - support
react-router
v6.0.0 (add listenObject: true options )
https://github.com/ReactTraining/react-router/releases/tag/v6.0.0-alpha.1
import { createReduxHistoryContext, reachify } from "redux-first-history";
import { createWouterHook } from "redux-first-history/wouter";
import { createBrowserHistory } from "history";
const { createReduxHistory, routerMiddleware, routerReducer } = createReduxHistoryContext({
history: createBrowserHistory(),
listenObject: true, // support react-router v6.0
});
export const history = createReduxHistory(store);
export const reachHistory = reachify(history);
export const wouterUseLocation = createWouterHook(history);
v4.5.0
- support imperatively
navigate
from@reach/router
import { navigate } from '@reach/router'`
usage:
import { createBrowserHistory } from 'history';
import { globalHistory } from '@reach/router';
const { createReduxHistory, routerMiddleware, routerReducer } = createReduxHistoryContext({
history: createBrowserHistory(),
//others options if needed
reachGlobalHistory: globalHistory
});