Integrates Redux dispatch actions into Next.js data fetching by wrapping createAsyncThunk thunks into a custom store. Version 1.6.7 is in beta and not production-ready. Requires @reduxjs/toolkit ^2.0.1, Next.js, React, and Redux ^5.0.0. Key differentiators: allows using Redux thunks for both server-side and client-side data fetching in Next.js App Router, but is still experimental with API subject to change.
npm install next-redux-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setup: create async thunks, create store with createReduxFetch, use store.dispatch with thunkActions in a server component, and wrap client component in dynamic import.
Do not use in production. Consider alternatives like RTK Query or plain fetch.
Ensure redux ^5.0.0 is installed alongside @reduxjs/toolkit. Use yarn/npm dedupe to resolve version conflicts.
Do not name any reducer as 'thunkActions' to avoid naming collision.
Use createReduxFetch and pass thunkActions option: createReduxFetch({ reducer: {} }, { thunkActions: { myAction } })Run: npm install next-redux-fetch (or yarn add next-redux-fetch). Ensure the import is in a file processed by bundler.
Set 'type': 'module' in package.json, or use .mjs extension, or switch to dynamic import().
Verify @reduxjs/toolkit ^2.0.1 is installed: npm list @reduxjs/toolkit. Import as: import { createAsyncThunk } from '@reduxjs/toolkit'