{"id":15155256,"url":"https://github.com/bmealhouse/next-redux-saga","last_synced_at":"2025-09-30T03:31:10.278Z","repository":{"id":65420726,"uuid":"97027365","full_name":"bmealhouse/next-redux-saga","owner":"bmealhouse","description":"redux-saga HOC for Next.js","archived":true,"fork":false,"pushed_at":"2020-09-12T01:48:50.000Z","size":2354,"stargazers_count":182,"open_issues_count":0,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-02T00:09:44.565Z","etag":null,"topics":["next","nextjs","react","reactredux","redux","redux-saga"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmealhouse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-12T16:04:30.000Z","updated_at":"2023-09-28T10:42:56.000Z","dependencies_parsed_at":"2023-01-23T10:55:17.745Z","dependency_job_id":null,"html_url":"https://github.com/bmealhouse/next-redux-saga","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmealhouse%2Fnext-redux-saga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmealhouse%2Fnext-redux-saga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmealhouse%2Fnext-redux-saga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmealhouse%2Fnext-redux-saga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmealhouse","download_url":"https://codeload.github.com/bmealhouse/next-redux-saga/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234695725,"owners_count":18873024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["next","nextjs","react","reactredux","redux","redux-saga"],"created_at":"2024-09-26T18:03:51.475Z","updated_at":"2025-09-30T03:31:04.882Z","avatar_url":"https://github.com/bmealhouse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"next-redux-saga\n=====\n\n# This project is no longer maintained!\n\nBecause `next.js` has grown massively and other packages with better support have covered the `redux-saga` SSR functionality.\nSee [#79](https://github.com/bmealhouse/next-redux-saga/issues/79) for more information.\n\n[![npm version](https://img.shields.io/npm/v/next-redux-saga.svg)](https://npmjs.org/package/next-redux-saga)\n[![npm downloads](https://img.shields.io/npm/dm/next-redux-saga.svg)](https://npmjs.org/package/next-redux-saga)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Build Status](https://travis-ci.com/bmealhouse/next-redux-saga.svg?branch=master)](https://travis-ci.com/bmealhouse/next-redux-saga)\n[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg)](#contributors)\n\n\u003e `redux-saga` HOC for [Next.js](https://github.com/zeit/next.js/). controlled `redux-saga` execution for server side rendering.\n\n\u003e **Attention:** Synchronous HOC is no longer supported since version 4.0.0!\n\n## Installation\n\n```sh\nyarn add next-redux-saga\n```\n\n## Getting Started\n\nCheck out the official [Next.js example](https://github.com/zeit/next.js/tree/canary/examples/with-redux-saga) or clone this repository and run the local example.\n\n### Try the local example\n\n1. Clone this repository\n1. Install dependencies: `yarn`\n1. Start the project: `yarn start`\n1. Open [http://localhost:3000](http://localhost:3000)\n\n## Usage\n\n`next-redux-saga` uses the redux store created by [next-redux-wrapper](https://github.com/kirill-konshin/next-redux-wrapper). Please refer to their documentation for more information.\n\n### Configure the Store wrapper\n\n```js\nimport {applyMiddleware, createStore} from 'redux'\nimport createSagaMiddleware from 'redux-saga'\nimport {createWrapper} from 'next-redux-wrapper'\n\nimport rootReducer from './root-reducer'\nimport rootSaga from './root-saga'\n\nconst makeStore = context =\u003e {\n  const sagaMiddleware = createSagaMiddleware()\n  const store = createStore(\n    rootReducer,\n    applyMiddleware(sagaMiddleware),\n  )\n\n  store.sagaTask = sagaMiddleware.run(rootSaga)\n\n  return store\n}\n\nconst wrapper = createWrapper(makeStore)\n\nexport default wrapper\n\n```\n\n### Configure Custom `_app.js` Component\n\n```js\nimport React from 'react'\nimport App from 'next/app'\nimport withReduxSaga from 'next-redux-saga'\n\nimport wrapper from './store-wrapper'\n\nclass ExampleApp extends App {\n  static async getInitialProps({Component, ctx}) {\n    let pageProps = {}\n\n    if (Component.getInitialProps) {\n      pageProps = await Component.getInitialProps(ctx)\n    }\n\n    return {pageProps}\n  }\n\n  render() {\n    const {Component, pageProps} = this.props\n    return (\n      \u003cComponent {...pageProps} /\u003e\n    )\n  }\n}\n\nexport default wrapper.withRedux(withReduxSaga(ExampleApp))\n```\n\n### Connect Page Components\n\n```js\nimport React, {Component} from 'react'\nimport {connect} from 'react-redux'\n\nclass ExamplePage extends Component {\n  static async getInitialProps({store}) {\n    store.dispatch({type: 'SOME_ASYNC_ACTION_REQUEST'})\n    return {staticData: 'Hello world!'}\n  }\n\n  render() {\n    return \u003cdiv\u003e{this.props.staticData}\u003c/div\u003e\n  }\n}\n\nexport default connect(state =\u003e state)(ExamplePage)\n```\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\u003ctr\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://twitter.com/bmealhouse\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/3741255?v=4\" width=\"100px;\" alt=\"Brent Mealhouse\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBrent Mealhouse\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=bmealhouse\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=bmealhouse\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=bmealhouse\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-bmealhouse\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#question-bmealhouse\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://bbortt.github.io\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/12272901?v=4\" width=\"100px;\" alt=\"Timon Borter\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTimon Borter\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=bbortt\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=bbortt\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=bbortt\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-bbortt\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#question-bbortt\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://abzanov.com\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/5141037?v=4\" width=\"100px;\" alt=\"Artem Abzanov\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eArtem Abzanov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=JerryCauser\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=JerryCauser\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=JerryCauser\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/RobbinHabermehl\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1640272?v=4\" width=\"100px;\" alt=\"Robbin Habermehl\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRobbin Habermehl\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=RobbinHabermehl\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=RobbinHabermehl\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/bmealhouse/next-redux-saga/commits?author=RobbinHabermehl\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## Contributing\n\n1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device\n1. Install the dependecies: `yarn`\n1. Link the package to the global module directory: `yarn link`\n1. Run `yarn test --watch` and start making your changes\n1. You can use `yarn link next-redux-saga` to test your changes in an actual project\n\n## LICENSE\n\nThis project is licensed under the terms of MIT license. See the [license file](https://github.com/bmealhouse/next-redux-saga/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmealhouse%2Fnext-redux-saga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmealhouse%2Fnext-redux-saga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmealhouse%2Fnext-redux-saga/lists"}