{"_id":"@abradley2/redux-loop","_rev":"1-371a8c728b8517c5aa49c440b8bfe863","name":"@abradley2/redux-loop","dist-tags":{"latest":"6.0.1"},"versions":{"6.0.1":{"name":"@abradley2/redux-loop","version":"6.0.1","description":"Sequence your effects naturally and purely by returning them from your reducers.","main":"lib/index.js","module":"es/index.js","jsnext:main":"es/index.js","homepage":"https://github.com/redux-loop/redux-loop","repository":{"type":"git","url":"git+https://github.com/redux-loop/redux-loop.git"},"bugs":{"url":"https://github.com/redux-loop/redux-loop/issues"},"scripts":{"compile-test":"tsc --noEmit","clear":"rimraf lib dist es","lint":"eslint --max-warnings=0 src test","test":"yarn compile-test && cross-env BABEL_ENV=test jest","build:commonjs":"cross-env BABEL_ENV=commonjs babel src --out-dir lib","build:es":"cross-env BABEL_ENV=es babel src --out-dir es","build:umd":"cross-env BABEL_ENV=es NODE_ENV=development rollup -c -i src/index.js -o dist/redux-loop.js","build:umd:min":"cross-env BABEL_ENV=es NODE_ENV=production rollup -c -i src/index.js -o dist/redux-loop.min.js","build":"yarn build:commonjs && yarn build:es && yarn build:umd && yarn build:umd:min","prebuild":"yarn run clear","prepublishOnly":"yarn lint && yarn test && yarn build","docs:clean":"rimraf _book","docs:prepare":"gitbook install","docs:build":"yarn run docs:prepare && gitbook build -g redux-loop/redux-loop && cp logo/logo.png _book/gitbook/images/logo.png && cp logo/favicon.ico _book/gitbook/images","docs:watch":"yarn run docs:prepare && gitbook serve","docs:publish":"yarn run docs:clean && yarn run docs:build && cp CNAME _book && cd _book && git init && git commit --allow-empty -m 'update book' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update book' && git push git@github.com:redux-loop/redux-loop gh-pages --force"},"keywords":["redux","middleware","effects","side effects","elm","loop"],"tags":["redux","middleware","effects","side effects","elm","loop"],"types":"./index.d.ts","author":{"name":"Luke William Westby","email":"luke.westby@raise.com"},"license":"MIT","peerDependencies":{"redux":"^3.7.2 || ^4.0.0"},"devDependencies":{"@babel/cli":"^7.4.4","@babel/core":"^7.4.4","@babel/plugin-transform-member-expression-literals":"^7.2.0","@babel/plugin-transform-property-literals":"^7.2.0","@babel/polyfill":"^7.4.4","@babel/preset-env":"^7.4.4","@typescript-eslint/eslint-plugin":"^3.2.0","@typescript-eslint/parser":"^3.2.0","babel-eslint":"^10.0.1","cross-env":"^7.0.2","eslint":"^7.3.0","eslint-config-prettier":"^6.0.0","eslint-plugin-prettier":"^3.0.1","gitbook-cli":"^2.3.2","gitbook-plugin-anchorjs":"^2.0.0","gitbook-plugin-edit-link":"^2.0.2","gitbook-plugin-github":"^3.0.0","gitbook-plugin-prism":"^2.3.0","immutable":"^3.7.6","jest":"^26.0.1","prettier":"2.0.5","redux":"^4.0.0","rimraf":"^3.0.0","rollup":"^2.18.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.0.0","rollup-plugin-terser":"^6.1.0","typescript":"^4.0.3"},"jest":{"testRegex":"(test/.*\\.spec.js)$","testPathIgnorePatterns":["_book"],"testURL":"http://localhost"},"gitHead":"56d6fe59ab95e7bd52e178baa55dd116fdc3fde2","_id":"@abradley2/redux-loop@6.0.1","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-oPBJkkkXhfDMn2mC05F4wATZd7w7rfxxC7ZQZOQQJrzYazA4IeHh4cyZVaVh3VZro/jcbIfbrs0jHJu12kLlhg==","shasum":"9b1c9fdbaa78e7b6540dcc49b73adb9831cec8c3","tarball":"https://registry.npmjs.org/@abradley2/redux-loop/-/redux-loop-6.0.1.tgz","fileCount":36,"unpackedSize":150531,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYJS/CRA9TVsSAnZWagAAo5IP/1ciZz7kTVQs6eO9Qulw\naUjACXdBaVGaQeZz8tuCgiYxWqZgcf9t6YfGYAy+pdSs4Emieb0D57WK1hOl\nhSa23/7V4zvJLkM5Yu+aMgH8tmsonyYUBdNlPrZYktSeFMs6+EwFgNlqSC2T\nb3umSaEicpOMRy6ZMFnT2eCmKkYGlf0OfTjxmtyPoKWHCZJK5LDW17k1lodY\nJzr0jJlX59aWKvyUKWlZDi8RAqVWlwEnYDxKroCtGDi2VRo8Gnc10Lw45RQ0\n3Og7bMhD/A/fPrdcK36/sB/EJ/IiwJqFj9KHXqYijhoTEKXDTCiZVQFyZ+XQ\n1vSYH4a1rarIqp3v7U6SAPetgyWqhtXPDYAVCtsadKzRvKfDm1jXt9HeeSHF\nxS7J2urEkppPk0fkTgJpeVAjbA3UDKPCygjbdrsHizqbt3tlvGzYIDmTVE5H\nuFMSu4x9duLcd6dHo09tz7AF3i/ExJvcTJbEkvzDpxbYvNGQNbFrf1t6XuMf\nO/wPvvSUH9UhuElZT+E3gl2GoFXZ+8kZtDMSsigREgYc/avSwuYS+jvPBhdS\njbpP6DYlimv5/MP9vhjrpq/UE7TfBb54VG0IggsTp1W0f1Ni7lr0/egHnaWs\nGIPtvXiUAy5CJF/bmSezkJaTz+cER6xVS/Bj2ZeI7dYGj0eMR/JaBiBurZN3\nuA6G\r\n=mBJF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBdrF6M8v7/RvEXQl3YdQPg8di9fAi92Hn5Apm9G1m0PAiEApTJrMahJRy0WH5D5Md/TgFy2DY/3bXb7NYDypGYJzFk="}]},"_npmUser":{"name":"abradley2","email":"antbradley91@gmail.com"},"directories":{},"maintainers":[{"name":"abradley2","email":"antbradley91@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-loop_6.0.1_1616942270964_0.7853881391672652"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-28T14:37:50.886Z","6.0.1":"2021-03-28T14:37:51.109Z","modified":"2022-04-04T11:01:38.233Z"},"maintainers":[{"name":"abradley2","email":"antbradley91@gmail.com"}],"description":"Sequence your effects naturally and purely by returning them from your reducers.","homepage":"https://github.com/redux-loop/redux-loop","keywords":["redux","middleware","effects","side effects","elm","loop"],"repository":{"type":"git","url":"git+https://github.com/redux-loop/redux-loop.git"},"author":{"name":"Luke William Westby","email":"luke.westby@raise.com"},"bugs":{"url":"https://github.com/redux-loop/redux-loop/issues"},"license":"MIT","readme":"# <img alt='redux-loop' src='https://raw.githubusercontent.com/raisemarketplace/redux-loop/master/logo/logo.png' height='200'>\r\n\r\nA port of the [Elm Architecture](https://github.com/evancz/elm-architecture-tutorial) to Redux that allows you to sequence your effects naturally and purely by returning them from your reducers.\r\n\r\n> Isn't it incorrect to cause side-effects in a reducer?\r\n\r\nYes! Absolutely.\r\n\r\n> Doesn't redux-loop put side-effects in the reducer?\r\n\r\nIt doesn't. The values returned from the reducer when scheduling an effect with\r\nredux-loop only _describe_ the effect. Calling the reducer will not cause the\r\neffect to run. The value returned by the reducer is just an object that the\r\nstore knows how to interpret when it is enhanced by redux-loop. You can safely\r\ncall a reducer in your tests without worrying about waiting for effects to finish\r\nand what they will do to your environment.\r\n\r\n> What are the environment requirements for redux-loop?\r\n\r\n`redux-loop` requires polyfills for ES6 `Promise` and `Symbol` to be included if\r\nthe browsers you target don't natively support them.\r\n\r\n## Why use this?\r\n\r\nHaving used and followed the progression of Redux and the Elm Architecture, and\r\nafter trying other effect patterns for Redux, we came to the following\r\nconclusion:\r\n\r\n> Synchronous state transitions caused by returning a new state from the reducer\r\n> in response to an action are just one of all possible effects an action can\r\n> have on application state.\r\n\r\nMany other methods for handling effects in Redux, especially those implemented\r\nwith action-creators, incorrectly teach the user that asynchronous effects are\r\nfundamentally different from synchronous state transitions. This separation\r\nencourages divergent and increasingly specific means of processing particular\r\ntypes effects. Instead, we should focus on making our reducers powerful enough\r\nto handle asynchronous effects as well as synchronous state transitions. With\r\n`redux-loop`, the reducer doesn't just decide what happens _*now*_ due to a\r\nparticular action, it decides what happens _*next*_. All of the behavior of your\r\napplication can be traced through one place, and that behavior can be easily broken\r\napart and composed back together. This is one of the most powerful features of the\r\n[Elm architecture](https://github.com/evancz/elm-architecture-tutorial), and with\r\n`redux-loop` it is a feature of Redux as well.\r\n\r\n## Installation\r\n\r\n```\r\nnpm install --save redux-loop\r\n```\r\n\r\n## Support\r\n\r\nPotential bugs, general discussion, and proposals or RFCs should be submitted\r\nas issues to this repo, we'll do our best to address them quickly. We use this\r\nlibrary as well and want it to be the best it can! For questions about using the\r\nlibrary, [submit questions on StackOverflow](http://stackoverflow.com/questions/ask)\r\nwith the [`redux-loop` tag](http://stackoverflow.com/questions/tagged/redux-loop).\r\n\r\n### Slack channel\r\n\r\n[Come join our slack channel.](https://reduxloop-slack.herokuapp.com/)\r\n\r\n### Don't see a feature you want?\r\n\r\nIf you're interested in adding something to `redux-loop` but don't want to wait\r\nfor us to incorporate the idea you can follow these steps to get your own installable\r\nversion of `redux-loop` with your feature included:\r\n\r\n1. Fork the main repo here\r\n1. Add your feature or change\r\n1. Change the package `\"name\"` in package.json to be `\"@<your-npm-username>/redux-loop`\r\n1. Commit to master and `npm publish`\r\n1. `npm install @<your-npm-username>/redux-loop`\r\n\r\nWe are _**always**_ interested in new ideas, but sometimes we get a little busy and fall\r\nbehind on responding and reviewing PRs. Hopefully this process will allow you to\r\ncontinue making progress on your projects and also provide us with more context if and\r\nwhen you do decide to make a PR for your new feature or change. The best way to verify\r\nnew features for a library is to use them in real-world scenarios!\r\n\r\n## Contributing\r\n\r\nPlease note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. Multiple language translations are available at [contributor-covenant.org](https://www.contributor-covenant.org/translations.html)\r\n","readmeFilename":"README.md"}