├── .eslintrc.json ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── __tests__ ├── 01_basic_spec.js ├── 02_conditional_spec.js └── __snapshots__ │ ├── 01_basic_spec.js.snap │ └── 02_conditional_spec.js.snap ├── dist ├── index.js ├── use-async-combine-all.js ├── use-async-combine-race.js ├── use-async-combine-seq.js ├── use-async-run.js ├── use-async-task-axios.js ├── use-async-task-delay.js ├── use-async-task-fetch.js ├── use-async-task-timeout.js ├── use-async-task-wasm.js ├── use-async-task.js └── utils.js ├── examples ├── 01_minimal │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ └── index.js ├── 02_typescript │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.tsx │ │ ├── DisplayRemoteData.tsx │ │ └── index.ts ├── 03_startbutton │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.tsx │ │ ├── DisplayRemoteData.tsx │ │ ├── UserInfo.tsx │ │ └── index.ts ├── 04_typeahead │ ├── package.json │ ├── public │ │ └── index.html │ ├── screencast.gif │ └── src │ │ ├── App.tsx │ │ ├── GitHubSearch.tsx │ │ └── index.ts ├── 05_axios │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.tsx │ │ ├── DisplayRemoteData.tsx │ │ └── index.ts ├── 06_progress │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.tsx │ │ ├── DelayedData.tsx │ │ └── index.ts ├── 07_race │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.tsx │ │ ├── DelayedData.tsx │ │ └── index.ts ├── 08_wasm │ ├── package.json │ ├── public │ │ ├── index.html │ │ ├── slow_fib.wasm │ │ └── slow_fib.wat │ └── src │ │ ├── App.tsx │ │ ├── CalcFib.tsx │ │ └── index.ts ├── 09_args │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.tsx │ │ ├── DelayedSum.tsx │ │ └── index.ts └── 10_pagination │ ├── package.json │ ├── public │ └── index.html │ └── src │ ├── App.tsx │ ├── ContinuedList.tsx │ ├── PagedList.tsx │ └── index.ts ├── package.json ├── src ├── index.d.ts ├── index.js ├── use-async-combine-all.js ├── use-async-combine-race.js ├── use-async-combine-seq.js ├── use-async-run.js ├── use-async-task-axios.js ├── use-async-task-delay.js ├── use-async-task-fetch.js ├── use-async-task-timeout.js ├── use-async-task-wasm.js ├── use-async-task.js └── utils.js ├── tsconfig.json └── webpack.config.js /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | node_modules 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/README.md -------------------------------------------------------------------------------- /__tests__/01_basic_spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/__tests__/01_basic_spec.js -------------------------------------------------------------------------------- /__tests__/02_conditional_spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/__tests__/02_conditional_spec.js -------------------------------------------------------------------------------- /__tests__/__snapshots__/01_basic_spec.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/__tests__/__snapshots__/01_basic_spec.js.snap -------------------------------------------------------------------------------- /__tests__/__snapshots__/02_conditional_spec.js.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/__tests__/__snapshots__/02_conditional_spec.js.snap -------------------------------------------------------------------------------- /dist/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/index.js -------------------------------------------------------------------------------- /dist/use-async-combine-all.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-combine-all.js -------------------------------------------------------------------------------- /dist/use-async-combine-race.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-combine-race.js -------------------------------------------------------------------------------- /dist/use-async-combine-seq.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-combine-seq.js -------------------------------------------------------------------------------- /dist/use-async-run.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-run.js -------------------------------------------------------------------------------- /dist/use-async-task-axios.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-task-axios.js -------------------------------------------------------------------------------- /dist/use-async-task-delay.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-task-delay.js -------------------------------------------------------------------------------- /dist/use-async-task-fetch.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-task-fetch.js -------------------------------------------------------------------------------- /dist/use-async-task-timeout.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-task-timeout.js -------------------------------------------------------------------------------- /dist/use-async-task-wasm.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-task-wasm.js -------------------------------------------------------------------------------- /dist/use-async-task.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/use-async-task.js -------------------------------------------------------------------------------- /dist/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/dist/utils.js -------------------------------------------------------------------------------- /examples/01_minimal/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/01_minimal/package.json -------------------------------------------------------------------------------- /examples/01_minimal/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/01_minimal/public/index.html -------------------------------------------------------------------------------- /examples/01_minimal/src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/01_minimal/src/index.js -------------------------------------------------------------------------------- /examples/02_typescript/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/02_typescript/package.json -------------------------------------------------------------------------------- /examples/02_typescript/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/02_typescript/public/index.html -------------------------------------------------------------------------------- /examples/02_typescript/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/02_typescript/src/App.tsx -------------------------------------------------------------------------------- /examples/02_typescript/src/DisplayRemoteData.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/02_typescript/src/DisplayRemoteData.tsx -------------------------------------------------------------------------------- /examples/02_typescript/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/02_typescript/src/index.ts -------------------------------------------------------------------------------- /examples/03_startbutton/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/03_startbutton/package.json -------------------------------------------------------------------------------- /examples/03_startbutton/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/03_startbutton/public/index.html -------------------------------------------------------------------------------- /examples/03_startbutton/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/03_startbutton/src/App.tsx -------------------------------------------------------------------------------- /examples/03_startbutton/src/DisplayRemoteData.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/03_startbutton/src/DisplayRemoteData.tsx -------------------------------------------------------------------------------- /examples/03_startbutton/src/UserInfo.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/03_startbutton/src/UserInfo.tsx -------------------------------------------------------------------------------- /examples/03_startbutton/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/03_startbutton/src/index.ts -------------------------------------------------------------------------------- /examples/04_typeahead/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/04_typeahead/package.json -------------------------------------------------------------------------------- /examples/04_typeahead/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/04_typeahead/public/index.html -------------------------------------------------------------------------------- /examples/04_typeahead/screencast.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/04_typeahead/screencast.gif -------------------------------------------------------------------------------- /examples/04_typeahead/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/04_typeahead/src/App.tsx -------------------------------------------------------------------------------- /examples/04_typeahead/src/GitHubSearch.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/04_typeahead/src/GitHubSearch.tsx -------------------------------------------------------------------------------- /examples/04_typeahead/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/04_typeahead/src/index.ts -------------------------------------------------------------------------------- /examples/05_axios/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/05_axios/package.json -------------------------------------------------------------------------------- /examples/05_axios/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/05_axios/public/index.html -------------------------------------------------------------------------------- /examples/05_axios/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/05_axios/src/App.tsx -------------------------------------------------------------------------------- /examples/05_axios/src/DisplayRemoteData.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/05_axios/src/DisplayRemoteData.tsx -------------------------------------------------------------------------------- /examples/05_axios/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/05_axios/src/index.ts -------------------------------------------------------------------------------- /examples/06_progress/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/06_progress/package.json -------------------------------------------------------------------------------- /examples/06_progress/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/06_progress/public/index.html -------------------------------------------------------------------------------- /examples/06_progress/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/06_progress/src/App.tsx -------------------------------------------------------------------------------- /examples/06_progress/src/DelayedData.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/06_progress/src/DelayedData.tsx -------------------------------------------------------------------------------- /examples/06_progress/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/06_progress/src/index.ts -------------------------------------------------------------------------------- /examples/07_race/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/07_race/package.json -------------------------------------------------------------------------------- /examples/07_race/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/07_race/public/index.html -------------------------------------------------------------------------------- /examples/07_race/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/07_race/src/App.tsx -------------------------------------------------------------------------------- /examples/07_race/src/DelayedData.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/07_race/src/DelayedData.tsx -------------------------------------------------------------------------------- /examples/07_race/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/07_race/src/index.ts -------------------------------------------------------------------------------- /examples/08_wasm/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/package.json -------------------------------------------------------------------------------- /examples/08_wasm/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/public/index.html -------------------------------------------------------------------------------- /examples/08_wasm/public/slow_fib.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/public/slow_fib.wasm -------------------------------------------------------------------------------- /examples/08_wasm/public/slow_fib.wat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/public/slow_fib.wat -------------------------------------------------------------------------------- /examples/08_wasm/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/src/App.tsx -------------------------------------------------------------------------------- /examples/08_wasm/src/CalcFib.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/src/CalcFib.tsx -------------------------------------------------------------------------------- /examples/08_wasm/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/08_wasm/src/index.ts -------------------------------------------------------------------------------- /examples/09_args/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/09_args/package.json -------------------------------------------------------------------------------- /examples/09_args/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/09_args/public/index.html -------------------------------------------------------------------------------- /examples/09_args/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/09_args/src/App.tsx -------------------------------------------------------------------------------- /examples/09_args/src/DelayedSum.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/09_args/src/DelayedSum.tsx -------------------------------------------------------------------------------- /examples/09_args/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/09_args/src/index.ts -------------------------------------------------------------------------------- /examples/10_pagination/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/10_pagination/package.json -------------------------------------------------------------------------------- /examples/10_pagination/public/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/10_pagination/public/index.html -------------------------------------------------------------------------------- /examples/10_pagination/src/App.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/10_pagination/src/App.tsx -------------------------------------------------------------------------------- /examples/10_pagination/src/ContinuedList.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/10_pagination/src/ContinuedList.tsx -------------------------------------------------------------------------------- /examples/10_pagination/src/PagedList.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/10_pagination/src/PagedList.tsx -------------------------------------------------------------------------------- /examples/10_pagination/src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/examples/10_pagination/src/index.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/package.json -------------------------------------------------------------------------------- /src/index.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/index.d.ts -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/index.js -------------------------------------------------------------------------------- /src/use-async-combine-all.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-combine-all.js -------------------------------------------------------------------------------- /src/use-async-combine-race.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-combine-race.js -------------------------------------------------------------------------------- /src/use-async-combine-seq.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-combine-seq.js -------------------------------------------------------------------------------- /src/use-async-run.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-run.js -------------------------------------------------------------------------------- /src/use-async-task-axios.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-task-axios.js -------------------------------------------------------------------------------- /src/use-async-task-delay.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-task-delay.js -------------------------------------------------------------------------------- /src/use-async-task-fetch.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-task-fetch.js -------------------------------------------------------------------------------- /src/use-async-task-timeout.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-task-timeout.js -------------------------------------------------------------------------------- /src/use-async-task-wasm.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-task-wasm.js -------------------------------------------------------------------------------- /src/use-async-task.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/use-async-task.js -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/src/utils.js -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/tsconfig.json -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dai-shi/react-hooks-async/HEAD/webpack.config.js --------------------------------------------------------------------------------