useAsyncState type error
See original GitHub issueAfter update to 7.5.4 get error
TS2322: Type 'false' is not assignable to type 'true | undefined'.
const { state, isReady, execute } = useAsyncState(promise, initialState, {
shallow: false,
})
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
useAsyncState - VueUse
(e: Error) => void /** * Sets the state to initialState before executing the promise. * * This can be useful when calling...
Read more >useAsyncState's execute will not throw exceptions · Issue #1629
Describe the bug I think sometimes I just use the execute of useAsyncState to call manually, at this time I prefer to handle...
Read more >reactjs - useState Inside Async Function Throws TypeError
The Code works but when I add the setLoading hook inside handleSubmit then I get the following error. TypeError: Cannot read properties of...
Read more >Handling Asynchrony in Vue 3 / Composition API
If the server sends an error response, the view would be stuck in spinner land forever. ... **vue-composition-toolkit **— useAsyncState
Read more >react-async-state-hook - npm
React Async State provides the hook useAsyncState to replace the React ... If callback was unsuccesful then the data on the error is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe fix it somehow so that don’t require explicit
false
in type parameter?I dont’ think so, it’s designed to provide more accurate type for
state
.