Skip to content

Commit

Permalink
Update connected-react-router to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
nickspaargaren committed Sep 15, 2024
1 parent 5dc59d5 commit 69cefa1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"babel-polyfill": "^6.26.0",
"bootstrap": "^4.3.1",
"classnames": "^2.2.6",
"connected-react-router": "^4.2.3",
"connected-react-router": "^6.9.3",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"firebase": "^7.16.0",
Expand Down
4 changes: 3 additions & 1 deletion src/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { combineReducers } from "redux";
import { firebaseReducer } from "react-redux-firebase";
import { firestoreReducer } from "redux-firestore";
import itemReducer from "./item";
import { connectRouter } from 'connected-react-router'

export default combineReducers({
export default (history) => combineReducers({
router: connectRouter(history),
firebase: firebaseReducer,
firestore: firestoreReducer,
item: itemReducer,
Expand Down
6 changes: 3 additions & 3 deletions src/store.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { createStore, applyMiddleware, compose } from "redux";
import { routerMiddleware, connectRouter } from "connected-react-router";
import { routerMiddleware } from "connected-react-router";
import { createBrowserHistory } from "history";
import { createLogger } from "redux-logger";
import thunkMiddleware from "redux-thunk";
import freeze from "redux-freeze";
import { reactReduxFirebase } from "react-redux-firebase";
import { reduxFirestore } from "redux-firestore";
import firebase from "firebase/app";
import rootReducer from "./reducers/index";
import createRootReducer from "./reducers";
import "firebase/auth";
import "firebase/database";
import "firebase/firestore";
Expand Down Expand Up @@ -47,7 +47,7 @@ if (process.env.NODE_ENV !== "production") {
const middleware = applyMiddleware(...middlewares);

const store = createStoreWithFirebase(
connectRouter(history)(rootReducer),
createRootReducer(history),
middleware,
);

Expand Down
42 changes: 18 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4947,13 +4947,15 @@ connect-history-api-fallback@^2.0.0:
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz#647264845251a0daf25b97ce87834cace0f5f1c8"
integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==

connected-react-router@^4.2.3:
version "4.5.0"
resolved "https://registry.npmjs.org/connected-react-router/-/connected-react-router-4.5.0.tgz"
integrity "sha1-tvAhzChKJE++5w4W5f8PKkYT49M= sha512-SBBmAZrtmw4y7Rkl2PCct8lN/DuCftl7QSAFLgFyjjuYkeJKAzAvQjzNNNE4R3j2+6a4TUiv8qselxQ4+6H5eA=="
connected-react-router@^6.9.3:
version "6.9.3"
resolved "https://registry.yarnpkg.com/connected-react-router/-/connected-react-router-6.9.3.tgz#72300aca9f9d6f38e1f4a2901572faa02adec972"
integrity sha512-4ThxysOiv/R2Dc4Cke1eJwjKwH1Y51VDwlOrOfs1LjpdYOVvCNjNkZDayo7+sx42EeGJPQUNchWkjAIJdXGIOQ==
dependencies:
immutable "^3.8.1"
redux-seamless-immutable "^0.4.0"
lodash.isequalwith "^4.4.0"
prop-types "^15.7.2"
optionalDependencies:
immutable "^3.8.1 || ^4.0.0"
seamless-immutable "^7.1.3"

console-browserify@^1.1.0:
Expand Down Expand Up @@ -7656,10 +7658,10 @@ immutability-helper@^3.0.1:
resolved "https://registry.npmjs.org/immutability-helper/-/immutability-helper-3.1.1.tgz"
integrity "sha1-K4ayKG7TsSQcniO3sh4ERPUvd7c= sha512-Q0QaXjPjwIju/28TsugCHNEASwoCcJSyJV3uO1sOIQGI0jKgm9f41Lvz0DZj3n46cNCyAZTsEYoY4C2bVRUzyQ=="

immutable@^3.8.1:
version "3.8.2"
resolved "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz"
integrity "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM= sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg=="
"immutable@^3.8.1 || ^4.0.0":
version "4.3.7"
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.7.tgz#c70145fc90d89fb02021e65c84eb0226e4e5a381"
integrity sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==

import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1:
version "3.3.0"
Expand Down Expand Up @@ -9245,6 +9247,11 @@ lodash.debounce@^4.0.0, lodash.debounce@^4.0.8:
resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
integrity "sha1-gteb/zCmfEAF/9XiUVMArZyk168= sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="

lodash.isequalwith@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz#266726ddd528f854f21f4ea98a065606e0fbc6b0"
integrity sha512-dcZON0IalGBpRmJBmMkaoV7d3I80R2O+FrzsZyHdNSFrANq/cgDqKQNmAHE8UEj4+QYWwwhkQOVdLHiAopzlsQ==

lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz"
Expand Down Expand Up @@ -11669,11 +11676,6 @@ react-router-dom@^4.2.2:
react-router "^4.3.1"
warning "^4.0.1"

react-router-redux@^4.0.0:
version "4.0.8"
resolved "https://registry.npmjs.org/react-router-redux/-/react-router-redux-4.0.8.tgz"
integrity "sha1-InQDWWtRUeGCN32rg1tdRfD4BU4= sha512-lzlK+S6jZnn17BZbzBe6F8ok3YAhGAUlyWgRu3cz5mT199gKxfem5lNu3qcgzRiVhNEOFVG0/pdT+1t4aWhoQw=="

react-router@^4.2.0, react-router@^4.3.1:
version "4.3.1"
resolved "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz"
Expand Down Expand Up @@ -11965,14 +11967,6 @@ redux-logger@^3.0.6:
dependencies:
deep-diff "^0.3.5"

redux-seamless-immutable@^0.4.0:
version "0.4.0"
resolved "https://registry.npmjs.org/redux-seamless-immutable/-/redux-seamless-immutable-0.4.0.tgz"
integrity "sha1-tQ+GgOzF7wQCFVEmf3j6H/08+YU= sha512-/oS3fhrize9D3RSHemgJxVllohybRrad5IjccotFy8Ni4IKAPTtX1mqszpiCIl12+7v0dNqBpq6ES6R236AliQ=="
dependencies:
react-router-redux "^4.0.0"
seamless-immutable "^7.1.2"

redux-thunk@^2.2.0:
version "2.4.0"
resolved "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.0.tgz"
Expand Down Expand Up @@ -12464,7 +12458,7 @@ scrollparent@^2.0.1:
resolved "https://registry.npmjs.org/scrollparent/-/scrollparent-2.0.1.tgz"
integrity "sha1-cV1bnMV3YPsivczDvvtb/gaxoxc= sha512-HSdN78VMvFCSGCkh0oYX/tY4R3P1DW61f8+TeZZ4j2VLgfwvw0bpRSOv4PCVKisktIwbzHCfZsx+rLbbDBqIBA=="

seamless-immutable@^7.1.2, seamless-immutable@^7.1.3:
seamless-immutable@^7.1.3:
version "7.1.4"
resolved "https://registry.npmjs.org/seamless-immutable/-/seamless-immutable-7.1.4.tgz"
integrity "sha1-bpU23vCD3cTeoCB9ci4OgNDzcvg= sha512-XiUO1QP4ki4E2PHegiGAlu6r82o5A+6tRh7IkGGTVg/h+UoeX4nFBeCGPOhb4CYjvkqsfm/TUtvOMYC1xmV30A=="
Expand Down

0 comments on commit 69cefa1

Please sign in to comment.