{"id":49094,"library":"react-redux-request","title":"react-redux-request","description":"A declarative React component for data fetching that integrates seamlessly with Redux. Version 1.5.6 (stable, no recent updates) stores fetched data in the Redux store, acting as a cache. Unlike similar libraries, it uses render props and is BYOD (Bring Your Own Datafetcher), making no assumptions about how data is fetched. It reduces boilerplate by eliminating the need for manual action creators, reducers, and thunks/sagas. Requires React ^16.3 and react-redux ^5.","status":"active","version":"1.5.6","language":"javascript","source_language":"en","source_url":"https://github.com/sqren/react-redux-request","tags":["javascript","react","redux","react-redux","react-redux-request","request","fetch","declarative","data-fetching"],"install":[{"cmd":"npm install react-redux-request","lang":"bash","label":"npm"},{"cmd":"yarn add react-redux-request","lang":"bash","label":"yarn"},{"cmd":"pnpm add react-redux-request","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency for React components","package":"react","optional":false},{"reason":"Runtime peer dependency for Redux integration","package":"react-redux","optional":false}],"imports":[{"note":"Default export is not available; must use named import.","wrong":"import Request from 'react-redux-request'","symbol":"Request","correct":"import { Request } from 'react-redux-request'"},{"note":"The named export is 'reducer', not 'reducers'. Must be combined into your store.","wrong":"import { reducers } from 'react-redux-request'","symbol":"reducer","correct":"import { reducer } from 'react-redux-request'"},{"note":"CommonJS destructuring works; no default export.","wrong":null,"symbol":"Request and reducer","correct":"const { Request, reducer } = require('react-redux-request')"}],"quickstart":{"code":"import { createStore, combineReducers } from 'redux';\nimport { Provider } from 'react-redux';\nimport { Request, reducer } from 'react-redux-request';\n\nconst store = createStore(combineReducers({ reactReduxRequest: reducer }));\n\nfunction getData() {\n  return fetch('https://jsonplaceholder.typicode.com/posts/1').then(res => res.json());\n}\n\nconst App = () => (\n  <Provider store={store}>\n    <Request\n      fn={getData}\n      id=\"post\"\n      render={({ status, data, error }) => <div>{status}</div>}\n    />\n  </Provider>\n);","lang":"javascript","description":"Demonstrates basic setup: adding the reducer to the store and using the Request component with a fetch promise and a render prop showing status."},"warnings":[{"fix":"Ensure 'fn' returns a promise (e.g., using fetch or axios).","message":"The 'fn' function must return a promise, otherwise the component will not work correctly.","severity":"gotcha","affected_versions":"all"},{"fix":"Use distinct strings for different data fetching endpoints.","message":"The 'id' prop must be unique for each data request, otherwise data will be overwritten in the Redux store.","severity":"gotcha","affected_versions":"all"},{"fix":"Use combineReducers({ reactReduxRequest: reducer, ...otherReducers }) or configure store with that key.","message":"The reducer must be added under the key 'reactReduxRequest' in the combined reducers, or else the component will not find the state.","severity":"gotcha","affected_versions":"all"},{"fix":"Memoize the 'args' array or use primitive values to avoid unnecessary re-fetches.","message":"The 'args' prop, when changed, triggers a new fetch; if an array reference changes often, it may cause excessive fetches.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.5.6':18 '16.3':72 '5':77 'act':30 'action':65 'assumpt':50 'boilerpl':58 'bring':44 'byod':43 'cach':33 'compon':8 'creator':66 'data':10,25,53,92 'data-fetch':91 'datafetch':47 'declar':6,90 'elimin':60 'fetch':11,24,55,89,93 'integr':13 'javascript':78 'librari':36 'make':48 'manual':64 'need':62 'prop':40 'react':2,7,71,75,79,82,85 'react-redux':74,81 'react-redux-request':1,84 'recent':21 'reduc':57,67 'redux':3,16,28,76,80,83,86 'render':39 'request':4,87,88 'requir':70 'seamless':14 'similar':35 'stabl':19 'store':23,29 'thunks/sagas':69 'unlik':34 'updat':22 'use':38 'version':17","created_at":"2026-06-07T17:00:01.972459+00:00","updated_at":"2026-06-07T17:00:01.972459+00:00","problems":[{"fix":"Add the reducer: combineReducers({ reactReduxRequest: reducer })","cause":"Reducer not added to store or added under a different key.","error":"Error: Could not find 'reactReduxRequest' in store. Make sure the reducer is added under the key 'reactReduxRequest'."},{"fix":"Pass a function that returns a promise to the 'fn' prop.","cause":"The 'fn' prop is not provided or is not a function.","error":"TypeError: fn is not a function"},{"fix":"Provide a 'render' prop that returns a React element.","cause":"The 'render' prop is missing.","error":"Warning: Failed prop type: The prop `render` is marked as required in `Request`"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/sqren/react-redux-request#readme","github":"https://github.com/sqren/react-redux-request","docs":null,"changelog":null,"pypi":null,"npm":"react-redux-request","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}