{"_id":"suspend-react","_rev":"4565301","name":"suspend-react","description":"Integrate React Suspense into your apps","dist-tags":{"latest":"0.1.3"},"maintainers":[{"name":"drcmda","email":""}],"time":{"modified":"2026-04-10T09:16:59.000Z","created":"2021-11-02T14:22:39.325Z","0.1.3":"2023-06-13T14:32:29.603Z","0.1.2":"2023-06-13T10:07:15.449Z","0.1.1":"2023-06-13T10:01:13.992Z","0.1.0":"2023-06-11T20:48:18.059Z","0.0.10":"2023-05-05T07:19:19.608Z","0.0.9":"2022-12-18T11:47:21.694Z","0.0.8":"2021-11-04T13:38:22.207Z","0.0.7":"2021-11-04T11:24:48.434Z","0.0.6":"2021-11-04T11:09:42.408Z","0.0.5":"2021-11-03T08:02:23.636Z","0.0.4":"2021-11-02T23:00:02.551Z","0.0.3":"2021-11-02T22:53:36.361Z","0.0.2":"2021-11-02T20:17:25.402Z","0.0.1":"2021-11-02T17:12:10.553Z","0.0.0":"2021-11-02T14:22:39.325Z"},"users":{},"author":{"name":"Paul Henschel"},"repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"versions":{"0.1.3":{"name":"suspend-react","version":"0.1.3","description":"Integrate React Suspense into your apps","main":"index.cjs.js","module":"index.js","types":"index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","peerDependencies":{"react":">=17.0"},"dependencies":{},"private":false,"gitHead":"302d8cf52e0145385331ffc8bd822bff86bfd39a","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.1.3","_nodeVersion":"18.16.0","_npmVersion":"9.7.1","dist":{"shasum":"a52f49d21cfae9a2fb70bd0c68413d3f9d90768e","size":4547,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.1.3.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.1.3_1686666749384_0.40385477293838346"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-13T14:32:29.603Z","publish_time":1686666749603,"_source_registry_name":"default","_cnpm_publish_time":1686666749603},"0.1.2":{"name":"suspend-react","version":"0.1.2","description":"Integrate React Suspense into your apps","main":"dist/index.cjs.js","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","peerDependencies":{"react":">=17.0"},"dependencies":{},"private":false,"gitHead":"dd041193c571f7d685f2017aa6f37858590fec3e","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.1.2","_nodeVersion":"18.16.0","_npmVersion":"9.7.1","dist":{"shasum":"4223c7ebd75013623594786276711bc018085c5c","size":4551,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.1.2.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.1.2_1686650835226_0.49520141630924175"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-13T10:07:15.449Z","publish_time":1686650835449,"_source_registry_name":"default","deprecated":"This version has issue running in cjs environment.","_cnpm_publish_time":1686650835449},"0.1.1":{"name":"suspend-react","version":"0.1.1","description":"Integrate React Suspense into your apps","main":"dist/index.cjs.js","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","peerDependencies":{"react":">=17.0"},"dependencies":{},"private":false,"gitHead":"a6a36a981bc8f83856bd415498fa7838e583a6dc","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.1.1","_nodeVersion":"18.16.0","_npmVersion":"9.7.1","dist":{"shasum":"29a7fbeac884f569ea0ae38c4b94b4ecbd3d6186","size":2522,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.1.1.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.1.1_1686650473771_0.952134509938406"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-13T10:01:13.992Z","publish_time":1686650473992,"_source_registry_name":"default","deprecated":"This version has issue running in cjs environment.","_cnpm_publish_time":1686650473992},"0.1.0":{"name":"suspend-react","version":"0.1.0","description":"Integrate React Suspense into your apps","main":"dist/index.cjs.js","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{},"gitHead":"62ff048e4f80734ee2af8012b9102be9e467f6b5","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.1.0","_nodeVersion":"18.6.0","_npmVersion":"8.13.2","dist":{"shasum":"570595f315a68d50625387dcca8f502f32f499d8","size":10839,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.1.0.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.1.0_1686516497912_0.8668411382992518"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-11T20:48:18.059Z","publish_time":1686516498059,"_source_registry_name":"default","_cnpm_publish_time":1686516498059},"0.0.10":{"name":"suspend-react","version":"0.0.10","description":"Integrate React Suspense into your apps","main":"dist/index.cjs.js","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{},"gitHead":"ccf74fc5d009b3c61d72b9ea66e63dadcd1e36a5","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.10","_nodeVersion":"18.6.0","_npmVersion":"8.13.2","dist":{"shasum":"9b1cc83d13e0ded81fd6f65a3d564bbbfa7024ab","size":10620,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.10.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.10_1683271159327_0.600133421763722"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-05T07:19:19.608Z","publish_time":1683271159608,"_source_registry_name":"default","_cnpm_publish_time":1683271159608},"0.0.9":{"name":"suspend-react","version":"0.0.9","description":"Integrate React Suspense into your apps","main":"dist/index.cjs.js","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{},"gitHead":"b15ea50c0ab61ef61d8e6cdb324bd87ca83b78c9","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.9","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"shasum":"329072e330be9dc5cc97d1e3a563d542460c3ee5","size":10520,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.9.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.9_1671364041541_0.9685380830101173"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-18T11:47:24.560Z","publish_time":1671364041694,"_cnpm_publish_time":1671364041694},"0.0.8":{"name":"suspend-react","version":"0.0.8","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{},"gitHead":"b93ee812359a6b3a02260404cb10b3b5b69be8c1","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.8","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"b0740c1386b4eb652f17affe4339915ee268bd31","size":10463,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.8.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.8_1636033102033_0.884005781753703"},"_hasShrinkwrap":false,"publish_time":1636033102207,"_cnpm_publish_time":1636033102207,"_cnpmcore_publish_time":"2021-12-16T10:52:33.763Z"},"0.0.7":{"name":"suspend-react","version":"0.0.7","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{},"gitHead":"3c57f240cbd8ad885e136705af40d62bff65864e","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.7","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"bae1fd79b261d4a328a5f3cbace6fff772cbdd3b","size":10549,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.7.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.7_1636025088221_0.8933640717123792"},"_hasShrinkwrap":false,"publish_time":1636025088434,"_cnpm_publish_time":1636025088434,"_cnpmcore_publish_time":"2021-12-16T10:52:34.028Z"},"0.0.6":{"name":"suspend-react","version":"0.0.6","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{},"gitHead":"cfe5362bb00177c6d513985951dc11634a035ea0","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.6","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"fa66cd57260306ab60dad6ec114552d87afbd67a","size":10400,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.6.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.6_1636024182153_0.997239006536065"},"_hasShrinkwrap":false,"publish_time":1636024182408,"_cnpm_publish_time":1636024182408,"_cnpmcore_publish_time":"2021-12-16T10:52:34.197Z"},"0.0.5":{"name":"suspend-react","version":"0.0.5","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{"fast-deep-equal":"^3.1.3"},"gitHead":"a51b074bccb0abdd440a0579c31ee128db7723e0","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.5","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"0c765911d851c5fdb4313d7561290e584a1af8c4","size":9497,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.5.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.5_1635926543438_0.3525271515432584"},"_hasShrinkwrap":false,"publish_time":1635926543636,"_cnpm_publish_time":1635926543636,"_cnpmcore_publish_time":"2021-12-16T10:52:34.481Z"},"0.0.4":{"name":"suspend-react","version":"0.0.4","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{"fast-deep-equal":"^3.1.3"},"gitHead":"cca51dc75dcf66dbc2ab73c9a4040c0cd1c5851d","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.4","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"b1f1b0228363a0b667d217f92f22d93575ba5a1e","size":8946,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.4.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.4_1635894002167_0.3683988145834127"},"_hasShrinkwrap":false,"publish_time":1635894002551,"_cnpm_publish_time":1635894002551,"_cnpmcore_publish_time":"2021-12-16T10:52:34.703Z"},"0.0.3":{"name":"suspend-react","version":"0.0.3","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{"fast-deep-equal":"^3.1.3"},"gitHead":"ebe02ff9b53584f23dd7935a6ee801debfa83616","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.3","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"c12b22a35910d06cae24be8702a8fba05edc5bd6","size":8937,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.3.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.3_1635893616112_0.27276960481100465"},"_hasShrinkwrap":false,"publish_time":1635893616361,"_cnpm_publish_time":1635893616361,"_cnpmcore_publish_time":"2021-12-16T10:52:34.954Z"},"0.0.2":{"name":"suspend-react","version":"0.0.2","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{"fast-deep-equal":"^3.1.3"},"gitHead":"a7d5248856723c48bf3364de7c7ea7baad96c2c2","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.2","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"74cb3b14723f12182f4f01adf4f44bf8346b10b5","size":67087,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.2.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.2_1635884245017_0.36275244708028986"},"_hasShrinkwrap":false,"publish_time":1635884245402,"_cnpm_publish_time":1635884245402,"_cnpmcore_publish_time":"2021-12-16T10:52:35.389Z"},"0.0.1":{"name":"suspend-react","version":"0.0.1","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{"fast-deep-equal":"^3.1.3"},"gitHead":"f2f2ca4291af8f61fea9d4ce83a823c93c0bbdff","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.1","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"f96be143be78743dc99ceed48636d01b41af007c","size":63828,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.1.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.1_1635873130365_0.11010786708857379"},"_hasShrinkwrap":false,"publish_time":1635873130553,"_cnpm_publish_time":1635873130553,"_cnpmcore_publish_time":"2021-12-16T10:52:35.656Z"},"0.0.0":{"name":"suspend-react","version":"0.0.0","description":"Integrate React Suspense into your apps","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"keywords":["react","suspense","resource","asset"],"author":{"name":"Paul Henschel"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/pmndrs/suspend-react.git"},"homepage":"https://github.com/pmndrs/suspend-react#readme","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx}":["eslint --fix"]},"scripts":{"build":"rollup -c","postbuild":"tsc --emitDeclarationOnly","prepublishOnly":"npm run build","test":"echo no tests yet"},"devDependencies":{"@babel/core":"7.16.0","@babel/plugin-proposal-class-properties":"^7.16.0","@babel/plugin-transform-modules-commonjs":"7.16.0","@babel/plugin-transform-parameters":"7.16.0","@babel/plugin-transform-runtime":"7.16.0","@babel/plugin-transform-template-literals":"7.16.0","@babel/preset-env":"7.16.0","@babel/preset-react":"7.16.0","@babel/preset-typescript":"^7.16.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-node-resolve":"^13.0.6","@types/jest":"^27.0.2","@types/node":"^16.11.6","@types/react":"^17.0.33","@types/react-dom":"^17.0.10","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^5.3.0","@typescript-eslint/parser":"^5.3.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-import":"^2.25.2","eslint-plugin-jest":"^25.2.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.1","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","lint-staged":"^11.2.6","prettier":"^2.4.1","react":"^17.0.1","rollup":"^2.59.0","rollup-plugin-size-snapshot":"^0.12.0","rollup-plugin-terser":"^7.0.2","typescript":"^4.4.4"},"peerDependencies":{"react":">=17.0"},"dependencies":{"fast-deep-equal":"^3.1.3"},"gitHead":"be5736f6ec4bfbbbd56d4db2417fbd6036f0e36b","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"_id":"suspend-react@0.0.0","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"eb6447cd200bbe6ccbefb0fd2221839a7b811647","size":63501,"noattachment":false,"key":"/suspend-react/-/suspend-react-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/suspend-react/download/suspend-react-0.0.0.tgz"},"_npmUser":{"name":"drcmda","email":"drcmda@gmail.com"},"directories":{},"maintainers":[{"name":"drcmda","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/suspend-react_0.0.0_1635862959149_0.21649457847640163"},"_hasShrinkwrap":false,"publish_time":1635862959325,"_cnpm_publish_time":1635862959325,"_cnpmcore_publish_time":"2021-12-16T10:52:35.886Z"}},"readme":"[![Build Size](https://img.shields.io/bundlephobia/minzip/suspend-react@0.0.8?label=bundle%20size&style=flat&colorA=000000&colorB=000000)](https://bundlephobia.com/result?p=suspend-react)\n[![Version](https://img.shields.io/npm/v/suspend-react?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/suspend-react)\n\n<br />\n<a href=\"https://github.com/pmndrs/suspend-react\"><img src=\"https://github.com/pmndrs/suspend-react/blob/main/hero.svg?raw=true\" /></a>\n<br />\n<br />\n\n```shell\nnpm install suspend-react\n```\n\nThis library integrates your async ops into React suspense. Pending- and error-states are handled at the parental level which frees the individual component from that burden and allows for better orchestration. Think of it as async/await for components. **Works in all React versions >= 16.6**.\n\n```jsx\nimport { Suspense } from 'react'\nimport { suspend } from 'suspend-react'\n\nfunction Post({ id, version }) {\n  const data = suspend(async () => {\n    const res = await fetch(`https://hacker-news.firebaseio.com/${version}/item/${id}.json`)\n    return res.json()    \n  }, [id, version])\n  return (\n    <div>\n      {data.title} by {data.by}\n    </div>\n  )\n}\n\nfunction App() {\n  return (\n    <Suspense fallback={<div>loading...</div>}>\n      <Post id={1000} version=\"v0\" />\n    </Suspense>\n  )\n}\n```\n\n#### API\n\n```tsx\nconst suspend = <Keys extends Tuple<unknown>, Fn extends (...keys: Keys) => Promise<unknown>>(\n  fn: Fn | Promise<unknown>,\n  keys?: Keys,\n  config?: Config\n) => Await<ReturnType<Fn>>\n```\n\n```tsx\n// Function that returns a promise\nconst result = suspend((...keys) => anyPromise, keys, config)\n// async function\nconst result = suspend(async (...keys) => { /* ... */ }, keys, config)\n// Promise with keys\nconst result = suspend(anyPromise, keys, config)\n// Promise itself is the key\nconst result = suspend(anyPromise)\n```\n\n`suspend` yields control back to React and the render-phase is aborted. It will resume once your promise resolves. For this to work you need to wrap it into a `<React.Suspense>` block, which requires you to set a fallback (can be `null`).\n\nThe dependencies (the 2nd argument) act as cache-keys, use as many as you want. If an entry is already in cache, calling `suspend` with the same keys will return it _immediately_ without breaking the render-phase. Cache access is similar to useMemo but *across the component tree*.\n\nThe 1st argument has to be a promise, or a function that returns a promise, or an asyn function. It receives the keys as arguments. `suspend` will return the resolved value, not a promise! This is guaranteed, *you do not have to check for validity*. Errors will bubble up to the nearest error-boundary.\n\n#### Config\n\nBoth `suspend` and `preload` can _optionally_ receive a config object,\n\n###### Keep-alive\n\nThe `lifespan` prop allows you to invalidate items over time, it defaults to `0` (keep-alive forever). Every read refreshes the timer to ensure that used entries stay valid.\n\n```jsx\n// Keep cached item alive for one minute without read\nsuspend(fn, keys, { lifespan: 60000 })\n```\n\n###### Equality function\n\nThe `equal` prop customizes per-key validation, it defaults to `(a, b) => a === b` (reference equality).\n\n```jsx\nimport equal from 'fast-deep-equal'\n\n// Validate keys deeply\nsuspend(fn, keys, { equal })\n```\n\n#### Preloading\n\n```jsx\nimport { preload } from 'suspend-react'\n\nasync function fetchFromHN(id, version) {\n  const res = await fetch(`https://hacker-news.firebaseio.com/${version}/item/${id}.json`)\n  return res.json()\n}\n\npreload(fetchFromHN, [1000, 'v0'])\n```\n\n#### Cache busting\n\n```jsx\nimport { clear } from 'suspend-react'\n\n// Clear all cached entries\nclear()\n// Clear a specific entry\nclear([1000, 'v0'])\n```\n\n#### Peeking into entries outside of suspense\n\n```jsx\nimport { peek } from 'suspend-react'\n\n// This will either return the value (without suspense!) or undefined\npeek([1000, 'v0'])\n```\n\n#### Making cache-keys unique\n\nSince `suspend` operates on a global cache (for now, see [React 18](#react-18)), you might be wondering if keys could bleed, and yes they would. To establish cache-safety, create unique or semi-unique appendixes.\n\n```diff\n- suspend(fn, [1000, 'v0'])\n+ suspend(fn, [1000, 'v0', 'functionName/fetch'])\n```\n\nIf you publish a library that suspends, consider symbols.\n\n```jsx\nconst fetchUUID = Symbol()\n\nexport function Foo() {\n  suspend(fn, [1000, 'v0', fetchUUID])\n```\n\n#### Typescript\n\nCorrect types will be inferred automatically.\n\n#### React 18\n\nSuspense, as is, has been a stable part of React since 16.6, but React will likely add some [interesting caching and cache busting APIs](https://github.com/reactwg/react-18/discussions/25) that could allow you to define cache boundaries declaratively. Expect these to be work for suspend-react once they come out.\n\n#### Demos\n\nFetching posts from hacker-news: [codesandbox](https://codesandbox.io/s/use-asset-forked-yb62q)\n\nInfinite list: [codesandbox](https://codesandbox.io/s/use-asset-infinite-list-forked-cwvs7)\n","_attachments":{},"homepage":"https://github.com/pmndrs/suspend-react#readme","bugs":{"url":"https://github.com/pmndrs/suspend-react/issues"},"license":"MIT"}