Tags: mkurek/connected-react-router
Tags
v6.2.0-beta.2 Fix == - Return immutable location object in reducer (@foodforarabbit in supasate#226) Doc == - Refactor examples to use configureStore to align with README (@supasate in supasate#228)
v6.2.0-beta.1 Fixes --- - Move store and history subscription back to constructor (@supasate in supasate#227) Enhancements ------------ - Create selectors to retrieve search and hash (@antgonzales in supasate#203) - Add getter Typescript type support for getAction, getSearch, and getHash (@antgonzales in supasate#203)
v6.1.0 Fixes ---- - Move onLocationChanged to componentDidMount to avoid side-effect in constructor (supasate#217) - Prevent double-rendering on initilization (supasate#218) - Prevent ConnectedRouter from re-rendering on every redux store update (supasate#208, supasate#216) These fixes are significantly contributed by @AnnaTsu, @SergeyPoluektov, @jakewies, @firec0der, @madsmadsen, and @supasate Feature ------- - Output ESM build, and make module tree-shakeable (@unindented in supasate#202)
v6.0.0 Breaking Change --------------- - Support React Router v6 with the new Context API (@supasate in supasate#191) - Require React v16.4 and React Redux v6.0 or later Enhancement ---------- - Throw helpful error when router reducer not mounted under "router" key (@mattvague in supasate#175) - TypeScript: Remove a duplicate LocationChangeAction interface (@lazarljubenovic in supasate#180) - TypeScript: Be more specific on action creators' return type (@lazarljubenovic in supasate#181) - TypeScript: Create and export types for routerActions so they can be imported and used in definitions (@afholderman in supasate#189) Docs --- - Add example for push state using react-redux with connect (@wgao19 in supasate#179) Misc ---- - Add Code of Conduct (@supasate in supasate#182) - Remove unused variables from the examples folder (@Rhuansantos in supasate#190)
v6.0.0-beta.1 Breaking Change --------------- - Support react-redux v6 by using the new Context API. - Support custom context for <Provider>. - Required upgrading to react-redux v6.
v5.0.1 Fixes ===== - Fix TypeScript type for connectRouter (@dimitriirybakov in supasate#169 and @supasate) - Move history library to peer dependencies (@supasate)
v5.0.0 Breaking Change =============== Align public API with react-router-redux and allow various integrations (redux-loop, rematch, etc.) (@sgal in supasate#150) 1. In your reducer file, instead of exporting a root reducer, we need to export a function accepting `history` and returning a root reducer with a router key that uses connectRouter(history). ``` // reducers.js import { combineReducers } from 'redux' import { connectRouter } from 'connected-react-router' export default (history) => combineReducers({ router: connectRouter(history), ... // rest of your reducers }) ``` 2. In store configuration, `` // configureStore.js import { createBrowserHistory } from 'history' import { applyMiddleware, compose, createStore } from 'redux' import { routerMiddleware } from 'connected-react-router' import createRootReducer from './reducers' const history = createBrowserHistory() const store = createStore( createRootReducer(history), // root reducer with router state initialState, compose( applyMiddleware( routerMiddleware(history), // for dispatching history actions // ... other middlewares ... ), ), ) `` Enhancement =========== - Expose router reducer with customized name to make it work with other libraries (redux-loop, rematch, etc) (@sgal in supasate#150) - Add TypeScript definitions for immutable (@thomschke in supasate#145) - Add TypeScript definitions for seamless-immutable (@Brettm12345 in supasate#157) - Use string literal type for CALL_HISTORY_METHOD (@maxhawkins in supasate#147) - Move redux-seamless-immutable to devDependencies (@n3tr in supasate#167) Bug fix ======= - Fix redux state is created on every action (@sgal in supasate#150) - Fix TypeScript error on React 16 (@thomschke in supasate#145) - Fix connectRouter TypeScript definition (@supasate in supasate#156) - Update RouterAction types to be strongly typed on the exact strings (@colbydehart in supasate#149) - Fix FAQ links (@durasj in supasate#162 and supasate#163)
v4.5.0 Feature ====== - Support seamless-immutable (@joeyfigaro in supasate#127 and @Brettm12345 in supasate#138) Fix === - Fix TypeScript example config (@deemoding in supasate#131) - Add missing getLocaltion, getAction, and createMatchSelector for immutable structures in supasate#137)
v4.4.1 - Use string literal type for action type (@OliverJAsh in supasate#64) - Fix: Rename RouterAction(enum) to prevent exported name collisin (@Armour in supasate#117)