Skip to content

Commit ada8969

Browse files
authored
React Async v4 (#21)
This is a major update making `useAsync` the primary interface, stabilizing its API. It also adds the `useFetch` hook for more convenience working with HTTP requests. Furthermore there's several breaking changes: - `deferFn` now receives an `args` array as the first argument, instead of arguments to `run` being spread at the front of the arguments list. This enables better interop with TypeScript. You can use destructuring to keep using your existing variables. - The shorthand version of `useAsync` now takes the `options` object as optional second argument. This used to be `initialValue`, but was undocumented and inflexible.
1 parent 8719518 commit ada8969

File tree

10 files changed

+511
-249
lines changed

10 files changed

+511
-249
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"settings": {
1818
"react": {
19-
"version": "16.3"
19+
"version": "16.8"
2020
}
2121
}
2222
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ node_js:
44
cache:
55
directories:
66
- node_modules
7-
script: npm run test:compat && npm run test:hook
7+
script: npm run test:compat
88
after_success:
99
- bash <(curl -s https://codecov.io/bash) -e TRAVIS_NODE_VERSION

0 commit comments

Comments
 (0)