{"_id":"@arcticzeroo/react-promise-hook","_rev":"7-93c5ec05808702c317e9273984359e75","name":"@arcticzeroo/react-promise-hook","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.0":{"name":"@arcticzeroo/react-promise-hook","version":"1.0.0","keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","_id":"@arcticzeroo/react-promise-hook@1.0.0","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"dist":{"shasum":"1b00e39b59a5f5c5e8eabd7be8661020c64b7b73","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.0.0.tgz","fileCount":3,"integrity":"sha512-4D5oaXIV/LsELpkyBUKt1R0iEKdd4vzBzL6wmxsASgfpvWHfBb2I98ebAzrk2QaH4CWI3ven+eLsI2mQUGPIWg==","signatures":[{"sig":"MEYCIQD0mturqIPhKXOk5ZhhVM3LqnD5bOiom1ynejurdMtutAIhAPr18ICThHPvTABwN2IK6QFTgYzFCQt2dfIpK0tSKrix","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9wTvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqL9hAAhvo128cSurxc8MnKzoXM6r12GP5Pg3d1BEFwAm8Gqv0yQkXR\r\n/vzvqXV/3QYTc4rSBKfMpyO70BmFavKp8QXD4TVmXRpVtmnKsTXo9usbd9lB\r\ndJLcVxW6t1R/8exPNwyrhT21BzvoFsKHEv67lXwuuwke+E7Muc/HFDcr4iP5\r\nplo4bp8mVaGxMeFoYNVtVcP9CuSPkmj3SiWsizd3J3q8IhzG2VsUra7o4zCC\r\nf3aR0RzhjeuNjqr/40v180PKsFh9puVZKRwDYjY4q3EMS+Bw5oFCHsgDyiYE\r\nH//5KlXjvDJUpq0QqeywL+qqulFjoWbzlCkaRZsFLNqxJSIHTPz6m3xgEoY+\r\nxRzwqkSn3NC3gmd940ZgQrGfTkfJsAujAC3J6tUcY6HNneNCRhleUJegaVmn\r\n24hrwEYA282Lhy3IMMFHm7vLCMuIFnxS9Km6wbH2HpukAGGn0CrKczJ1uCd3\r\naf/iiJEIe22XMAEz+V6y9Evd8AxLOAnuaeXaI+MHPy7mVlfuTIKHKtrlqglN\r\nk3Wqy28AS1Kzql7z76vryvPgXwmWMMTv9SWkXiEvDI8vsBTAsm3+PAN4Uli4\r\nQYZ9Q8jk6dJ+EBMtLMOyzY948Sb05hDs5orvtMwntxymkYr0o2kVVM9a1d0y\r\nT7MXE02JdYmCsc5mR9LwlVslCCBHLOG0vtc=\r\n=XWHa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"./index.d.ts","gitHead":"82bc99a217af7d3a34909f67af38004466f0a64b","private":false,"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"repository":{"url":"git+https://github.com/arcticzeroo/react-promise-hook.git","type":"git"},"_npmVersion":"8.5.5","description":"Promise hooks for react","directories":{},"_nodeVersion":"16.8.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.5"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-hook_1.0.0_1677133039130_0.2161679106475689","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@arcticzeroo/react-promise-hook","version":"1.0.1","keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","_id":"@arcticzeroo/react-promise-hook@1.0.1","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"dist":{"shasum":"7918e3a5e0d9e818dcd4cc074388c52132601b98","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.0.1.tgz","fileCount":3,"integrity":"sha512-6WDcndajebgaTvKfibwZQTtz0ptAmF0PFAa9I9WZW+rBIgd9rfGGgCAAIc5AB9/T8x4MuICzrAErj9FC6gj5Tw==","signatures":[{"sig":"MEYCIQCnK5X13B4HUAnwUxFd/iXC/FksY3EQFgyjYwA+R0BXywIhAJ1CYacHJdwadBAIEBCdYK//Hs5c4NtmMgrQYLwIMerQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9wstACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrr2hAAnch/+74AtZq2Z8immWidjf/KaPdxbg73cre4iK3JEEdnAA7g\r\n/T6XtKVPf49lJ2deBKlKA+9mQ2fXetpg6NSiTmkG+CAE2z0t9wjMaHdSQfWg\r\nnoqeGHrao0lKxmqjn/5s47mJDEjSCFfFHGtRyaRzFUm7UATnUthalQqSGsH0\r\n4Oc633XLCfllNhcYIXWZvK0xhp4QT5MzptmBgn1ke4R+vDoZTUkBPGFIgGUH\r\ncTe+ke6w+BL/D6A4y4LmfcfpO9emiL9m1Se5Yx1Fb3h4opPSj2kFaAfFURiw\r\nfAkTxMd5Cd0PxCbzV4ozk6sGSVI3f9LSbzu4iupBNp157I2nvZa5dTA6Nbqg\r\n72B9dc8YLmuldTqGwCm3ulTytCwonnUAHVPAZsBE4AkSUdv+OCJQNoNA7b3Z\r\nAcHmHE3uxMRsh8o8+NTATpk9XCnhqm3L1A2ILt5v5MPlGZwbc2+UAqjPD2/p\r\nr/nLJ8W/9rF0SsRQ4/bhFCS9GhBJ64jMiMpZ6D29nnkhQVBTQ9csfY9/OVRZ\r\ntDIb7z2Iit3n+C94xyrpzGLIeRIRRHb3LkswD7XxZDTKWdpbSmuG/QB64vcn\r\nn2APrSj4IY1yhFlUwR9oEKkoHbZMsZRKHeYBAnKli6H14hsi7x964oD4J27x\r\nUSwNZaqlSkjd48mVRHOnGfG3TrU3z2EO9jU=\r\n=kQOL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"./index.d.ts","gitHead":"3fa9a691970f59a09258c078e48b671f7012c326","private":false,"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"repository":{"url":"git+https://github.com/arcticzeroo/react-promise-hook.git","type":"git"},"_npmVersion":"8.5.5","description":"Promise hooks for react","directories":{},"_nodeVersion":"16.8.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.5"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-hook_1.0.1_1677134637003_0.511994241773037","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@arcticzeroo/react-promise-hook","version":"1.1.0","keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","_id":"@arcticzeroo/react-promise-hook@1.1.0","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"dist":{"shasum":"db37db593cad02b2705b71a3019b1c96e0908de0","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.1.0.tgz","fileCount":3,"integrity":"sha512-nOvM646N/oFX+vXTAkWVelAYidLcpJpN9vbGHNuQ+qoZ5SOYOwzEcSsl101E9QAjSBq/J8JvIyEoPq2t3f/IcA==","signatures":[{"sig":"MEQCIA0sqxqSH6vRnjj6qvtmPpwEE/5Q9SXz45v/ZwaqCUsEAiAuL5H3ufe9MJEtVLJzrlEsQ67cGHU+6xUOIrz07yaIeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7050},"main":"index.js","types":"./index.d.ts","gitHead":"e5cb580651d62238dea3f6ac41baed5178878450","private":false,"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"repository":{"url":"git+https://github.com/arcticzeroo/react-promise-hook.git","type":"git"},"_npmVersion":"9.6.4","description":"Promise hooks for react","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.5"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-hook_1.1.0_1705508342525_0.13517067515351888","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@arcticzeroo/react-promise-hook","version":"1.2.0","keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","_id":"@arcticzeroo/react-promise-hook@1.2.0","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"dist":{"shasum":"e856d0183c5eb42dc5a6c36334745e9d03fce269","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.2.0.tgz","fileCount":3,"integrity":"sha512-daW4FNWhfTuU3A35VfDE/9tF4n3q/M9KR3SDb8OdCuGHJwceQQM2PKVTHA61DcF3eGg3sKrdGXO89VIQhVBiFw==","signatures":[{"sig":"MEYCIQCCyfXvNJLfIAxdvjMJiM+MAu4az+Dj/bPwLV2kBdWinQIhAJcczAUqxtQWeaBUJvWD2Q2VFUTckKeNAhmk6rJ5m5lk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8210},"main":"index.js","types":"./index.d.ts","gitHead":"6230b3102ffbb8a3474be77ae2f0eef07b2e62d4","private":false,"scripts":{"build":"npx tsc"},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"repository":{"url":"git+https://github.com/arcticzeroo/react-promise-hook.git","type":"git"},"_npmVersion":"9.6.4","description":"Promise hooks for react","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.5"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-hook_1.2.0_1709360913455_0.31627816255786145","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@arcticzeroo/react-promise-hook","version":"1.2.1","keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","_id":"@arcticzeroo/react-promise-hook@1.2.1","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"dist":{"shasum":"60943acc6908793be9b2571996a2fa41585d5825","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.2.1.tgz","fileCount":3,"integrity":"sha512-zlovZzYE8rAe2ax1S4bGpPm4WtJMuhwecI8gyrJ6gNmUH3jwXxtXG1R6zCmMBH6PzTJ0ylYwE+jwLo5cUrJbBA==","signatures":[{"sig":"MEUCIQCwIMviSaWPe0YcDWNC17PHR8649VqYsD+jkf70m5r2DQIgDAyl6iAZpbcjFZGWnsjKdYLDQBpHXgo6jNBeLxEMlr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8261},"main":"index.js","types":"./index.d.ts","gitHead":"71c8ad0ec00bd815f6d9efe30b05bd5da92e7ae3","private":false,"scripts":{"build":"npx tsc"},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"repository":{"url":"git+https://github.com/arcticzeroo/react-promise-hook.git","type":"git"},"_npmVersion":"9.6.4","description":"Promise hooks for react","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.5","@types/react":"^18.2.61"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-hook_1.2.1_1709361065498_0.2763865386510185","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@arcticzeroo/react-promise-hook","version":"1.3.0","keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","_id":"@arcticzeroo/react-promise-hook@1.3.0","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"dist":{"shasum":"2e363b7404fd7a963c4ace2521f891eee6951c21","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.3.0.tgz","fileCount":3,"integrity":"sha512-oG2zDgb6W7/aazeqYA7/Qtv2sEyZ+ox9GqHGr3iWPmZMaY3kr3NMLyfDskOz9/hVApq4kazetoWl7XrRjPJL1Q==","signatures":[{"sig":"MEUCICs++8dQuSB1Jf9uxef6QVqqro956VPjetZjOcX6VZJkAiEA6KK7Zt76qIApQ/OORLNCpCQ8YjNAUYOZIJYZE1yWPIc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7839},"main":"index.js","types":"./index.d.ts","gitHead":"74d0cec6c2c8d0cb18d98ea5a5e0e779da834b49","private":false,"scripts":{"build":"npx tsc"},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"repository":{"url":"git+https://github.com/arcticzeroo/react-promise-hook.git","type":"git"},"_npmVersion":"9.6.4","description":"Promise hooks for react","directories":{},"_nodeVersion":"20.1.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.9.5","@types/react":"^18.2.61"},"peerDependencies":{"react":"^18.2.0"},"_npmOperationalInternal":{"tmp":"tmp/react-promise-hook_1.3.0_1717281285690_0.046946458783128975","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@arcticzeroo/react-promise-hook","private":false,"version":"1.5.0","description":"Promise hooks for react","main":"index.js","exports":{".":"./index.js","./eslint":"./eslint.js"},"scripts":{"build":"npx tsc"},"repository":{"type":"git","url":"git+https://github.com/arcticzeroo/react-promise-hook.git"},"keywords":["react","promise","hook"],"author":{"name":"spencer@frozor.io"},"license":"ISC","bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","peerDependencies":{"react":"^18.2.0 || ^19.0.0"},"devDependencies":{"@types/react":"^18.2.61 || ^19.0.0","typescript":"^4.9.5"},"_id":"@arcticzeroo/react-promise-hook@1.5.0","gitHead":"6a077945fee3288dfed5d1b35834d34b1f31cd9f","types":"./index.d.ts","_nodeVersion":"23.7.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-dSfNQ7ZaQYDUFZcwUBcvNkTxUsTPcDGHamtLs4BwCmJ6rgldzD5JTm0AShX/hOqKr+0t5DfTNnxAMDkiU9lJXA==","shasum":"80020c635abdba3eb8e284b0571f1b4870701b31","tarball":"https://registry.npmjs.org/@arcticzeroo/react-promise-hook/-/react-promise-hook-1.5.0.tgz","fileCount":5,"unpackedSize":14110,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC0OC+ughOXI7fMwQ8N4HuftqICYq9t9c5QJJ8L5vgmUAiEA416ZOJUYVjcAf6CygG7D8qo9rQ8yW1RVfQDjOC3ZPnI="}]},"_npmUser":{"name":"arcticzeroo","email":"spencer@frozor.io"},"directories":{},"maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-promise-hook_1.5.0_1772604636335_0.6462007398084935"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-23T06:17:19.069Z","modified":"2026-03-04T06:10:36.589Z","1.0.0":"2023-02-23T06:17:19.278Z","1.0.1":"2023-02-23T06:43:57.162Z","1.1.0":"2024-01-17T16:19:02.682Z","1.2.0":"2024-03-02T06:28:33.631Z","1.2.1":"2024-03-02T06:31:05.676Z","1.3.0":"2024-06-01T22:34:45.873Z","1.5.0":"2026-03-04T06:10:36.485Z"},"bugs":{"url":"https://github.com/arcticzeroo/react-promise-hook/issues"},"author":{"name":"spencer@frozor.io"},"license":"ISC","homepage":"https://github.com/arcticzeroo/react-promise-hook#readme","keywords":["react","promise","hook"],"repository":{"type":"git","url":"git+https://github.com/arcticzeroo/react-promise-hook.git"},"description":"Promise hooks for react","maintainers":[{"name":"arcticzeroo","email":"spencer@frozor.io"}],"readme":"# @arcticzeroo/react-promise-hook\r\n\r\nReact hooks for managing promise state. Provides a simple way to track the lifecycle of async operations — loading, success, and error — without boilerplate.\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install @arcticzeroo/react-promise-hook\r\n```\r\n\r\n## Hooks\r\n\r\n### `useImmediatePromiseState<T>(returnsPromise: () => Promise<T>): IRunnablePromiseState<T>`\r\n\r\nRuns the promise immediately when the callback changes. Wrap your callback in `useCallback` to avoid infinite loops.\r\n\r\n```tsx\r\nconst loadUsers = useCallback(() => fetch('/api/users').then(r => r.json()), []);\r\nconst { value, error, stage, run } = useImmediatePromiseState(loadUsers);\r\n\r\nif (stage === PromiseStage.error) {\r\n    return <RetryButton onClick={run} />;\r\n}\r\n\r\nif (stage !== PromiseStage.success) {\r\n    return <Spinner />;\r\n}\r\n\r\nreturn <UserList users={value} />;\r\n```\r\n\r\n### `useDelayedPromiseState<T>(returnsPromise: () => Promise<T>, keepLastValue?: boolean): IDelayedPromiseState<T>`\r\n\r\nLike `useImmediatePromiseState`, but does not run automatically — call `run()` yourself. When `keepLastValue` is `true` (the default), the previous `value` is preserved during re-fetches to avoid UI flashing.\r\n\r\nReturns an additional `actualStage` field reflecting the real-time stage, while `stage` holds the last completed stage when `keepLastValue` is enabled.\r\n\r\n```tsx\r\nconst search = useCallback(() => fetch(`/api/search?q=${query}`).then(r => r.json()), [query]);\r\nconst { value, stage, actualStage, run } = useDelayedPromiseState(search);\r\n\r\nuseEffect(() => { run(); }, [run]);\r\n```\r\n\r\n### `useExistingPromiseState<T>(promise: Promise<T>): IPromiseState<T>`\r\n\r\nTracks state of an already-existing promise. Stage starts at `running`.\r\n\r\n### `useMaybeExistingPromiseState<T>(promise: Promise<T> | undefined | null, initialStage?: PromiseStage): IPromiseState<T>`\r\n\r\nLike `useExistingPromiseState`, but accepts `undefined`/`null`. Stage starts at `initialStage` (default: `notRun`) until a promise is provided.\r\n\r\n## Types\r\n\r\n```ts\r\nenum PromiseStage {\r\n    notRun,\r\n    running,\r\n    error,\r\n    success,\r\n}\r\n\r\ninterface IPromiseState<T> {\r\n    stage: PromiseStage;\r\n    value: T | undefined;\r\n    error: any;\r\n}\r\n\r\ninterface IRunnablePromiseState<T> extends IPromiseState<T> {\r\n    run: () => void;\r\n}\r\n\r\ninterface IDelayedPromiseState<T> extends IRunnablePromiseState<T> {\r\n    actualStage: PromiseStage;\r\n}\r\n```\r\n\r\n## ESLint Plugin\r\n\r\nThe package ships with an ESLint rule to catch a common mistake: destructuring only `value` from a promise state hook without handling errors. This leads to silently ignored failures and missing loading states.\r\n\r\n### The Problem\r\n\r\n```tsx\r\n// ❌ Bad: error and loading states are silently ignored\r\nconst { value } = useImmediatePromiseState(fetchData);\r\nreturn <div>{value}</div>;\r\n\r\n// ✅ Good: stage is checked to handle all states\r\nconst { value, stage } = useImmediatePromiseState(fetchData);\r\n\r\n// ✅ Also good: both value and error are destructured\r\nconst { value, error } = useImmediatePromiseState(fetchData);\r\n```\r\n\r\nThe `require-promise-state-stage` rule enforces that when destructuring a promise state hook, you must include either:\r\n- `stage` or `actualStage`, **or**\r\n- both `value` and `error`\r\n\r\n### Setup\r\n\r\n#### Flat config (`eslint.config.js`)\r\n\r\n```js\r\nimport promiseHook from '@arcticzeroo/react-promise-hook/eslint';\r\n\r\nexport default [\r\n    promiseHook.configs.recommended,\r\n    // ... your other config\r\n];\r\n```\r\n\r\n#### Legacy config (`.eslintrc`)\r\n\r\n```json\r\n{\r\n    \"plugins\": [\"@arcticzeroo/react-promise-hook\"],\r\n    \"rules\": {\r\n        \"@arcticzeroo/react-promise-hook/require-promise-state-stage\": \"error\"\r\n    }\r\n}\r\n```\r\n","readmeFilename":"README.md"}