{"id":26178,"library":"redux-view","title":"redux-view","description":"A view wrapper for Redux and React-Router that simplifies mapping between routes, handling data fetching on route transitions, and navigating from dispatch functions. Current stable version is 0.2.1 (last released in 2016). Release cadence is low/unmaintained. Key differentiators: provides initialize/terminate lifecycle hooks that work even when routes share the same component (solving a common react-router gotcha), and injects the router as a third parameter to mapDispatchToProps for easy navigation. Requires react-redux 4.x, react-router >=2.0.0 or ^4.0.0-alpha.0, and lodash 4.x.","status":"deprecated","version":"0.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/randallknutson/redux-view","tags":["javascript","redux","react-redux","react-router"],"install":[{"cmd":"npm install redux-view","lang":"bash","label":"npm"},{"cmd":"yarn add redux-view","lang":"bash","label":"yarn"},{"cmd":"pnpm add redux-view","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency specified as 4.x","package":"lodash","optional":false},{"reason":"peer dependency for connect and Provider","package":"react-redux","optional":false},{"reason":"peer dependency for routing and transition methods","package":"react-router","optional":false}],"imports":[{"note":"Library provides a default export; require with .default only needed if mixing CJS.","wrong":"const ReduxView = require('redux-view').default","symbol":"default (ReduxView)","correct":"import ReduxView from 'redux-view'"},{"note":"Default export is the class itself.","wrong":"class MyView extends ReduxView.default { ... }","symbol":"ReduxView class","correct":"class MyView extends ReduxView { ... }"},{"note":"initialize is an instance method property, not set in constructor.","wrong":"class MyView extends ReduxView { constructor() { this.initialize = () => {} } }","symbol":"initialize method","correct":"class MyView extends ReduxView { initialize = ({ dispatch }) => { ... } }"}],"quickstart":{"code":"import ReduxView from 'redux-view';\nimport { createStore, combineReducers } from 'redux';\nimport { Provider } from 'react-redux';\nimport { BrowserRouter, Route } from 'react-router-dom';\nimport React from 'react';\nimport { render } from 'react-dom';\n\nclass HomeView extends ReduxView {\n  container = ({ message }) => <h1>{message}</h1>;\n  initialize = ({ dispatch }) => {\n    dispatch({ type: 'SET_MESSAGE', payload: 'Welcome!' });\n  };\n  mapStateToProps = (state) => ({\n    message: state.message,\n  });\n}\n\nconst reducer = (state = { message: '' }, action) => {\n  switch(action.type) {\n    case 'SET_MESSAGE': return { ...state, message: action.payload };\n    default: return state;\n  }\n};\n\nconst store = createStore(combineReducers({ message: reducer }));\n\nconst App = () => (\n  <Provider store={store}>\n    <BrowserRouter>\n      <Route path=\"/\" component={HomeView} />\n    </BrowserRouter>\n  </Provider>\n);\n\nrender(<App />, document.getElementById('root'));","lang":"javascript","description":"Basic usage: extending ReduxView class, defining container, initialize, and mapStateToProps, then rendering with react-redux Provider and react-router Route."},"warnings":[{"fix":"Migrate to react-router v6 with hooks (useNavigate, useParams) and react-redux v7+ with hooks (useSelector, useDispatch).","message":"redux-view is unmaintained (last release 2016). No updates for react-redux >=5.x or react-router >=5.x. Use modern alternatives like react-router hooks or useReducer.","severity":"deprecated","affected_versions":"all"},{"fix":"Verify react-router version; use react-router-dom v4 or earlier. For v4+, the library may not function correctly.","message":"react-router v4 changed routing API; react-router-dom is separate package. This library's integration may not work with versions > 4.0.0-alpha.0.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use getDerivedStateFromProps or useEffect in modern React. Library is not compatible with React Suspense or Concurrent Mode.","message":"initialize and terminate methods rely on componentWillReceiveProps to detect route changes. This lifecycle is deprecated in React 16.3+ and may be removed in React 17+. In React 16+, they still work but with warnings.","severity":"gotcha","affected_versions":">=16.3"},{"fix":"Ensure your build pipeline supports class properties (e.g., Babel plugin @babel/plugin-proposal-class-properties).","message":"Library uses React.createClass internally? No, it expects class syntax. But the pattern of class properties for lifecycle hooks is non-standard and may not work with modern transpilers (e.g., if class fields are not supported).","severity":"deprecated","affected_versions":"all"},{"fix":"Use react-router v4's withRouter HOC or hooks to get history, or use the library's built-in router parameter but ensure compatibility.","message":"The mapDispatchToProps third parameter (router) exposes a transitionTo method. With react-router v4+, router object is different and may not have transitionTo. Use history.push instead.","severity":"breaking","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import ReduxView from 'redux-view' (default import).","cause":"Importing ReduxView incorrectly (e.g., import { ReduxView } instead of default import).","error":"Class extends value undefined is not a constructor or null"},{"fix":"Run npm install --save redux-view and check import path is correct (no subpath).","cause":"Package not installed or typo in import path.","error":"can't resolve 'redux-view' in ..."},{"fix":"Use react-router v3 or pass history directly. For v4+, use withRouter or hooks.","cause":"Using router parameter in mapDispatchToProps but react-router version does not provide transitionTo (e.g., v4+).","error":"Cannot read property 'transitionTo' of undefined"},{"fix":"Ignore warning (still works) or consider migrating away from redux-view.","cause":"Library uses UNSAFE_componentWillReceiveProps internally. React 16.3+ shows deprecation warning.","error":"Warning: componentWillReceiveProps has been renamed, and is not recommended for use."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}