First immediate api call has no result callback
See original GitHub issueWhat’s going on? First api call in the first screen has no result callback
Steps to reproduce
- switch the stack screen order in ‘main-navigator.tsx’ to be
<Stack.Screen name="demoList" component={DemoListScreen} /> <Stack.Screen name="welcome" component={WelcomeScreen} />
then start the program, you will find out it will never get the result
const result = await characterApi.getCharacters()
in character-store.ts file
It only happen in the initial screen.
npx ignite-cli doctor
results:
System
platform darwin
arch x64
cpu 12 cores Intel® Core™ i7-8700 CPU @ 3.20GHz
directory canbeDeleted /Users/maci/Documents/git/canbeDeleted
JavaScript (and globally-installed packages) node 16.3.0 /usr/local/bin/node npm 7.17.0 /usr/local/bin/npm npm 7.17.0 yarn 1.22.10 yarn 1.22.10 /usr/local/bin/yarn code-push-cli 2.1.9 ignite-cli 7.0.3
Ignite ignite-cli 7.0.3 /usr/local/bin/ignite ignite src build /Users/maci/.config/yarn/global/node_modules/ignite-cli/build
Android java 1.8.0_261 /usr/bin/java android home - /Users/maci/Library/Android/sdk
iOS xcode 12.5.1 cocoapods 1.10.1 /usr/local/bin/pod
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (6 by maintainers)
Top GitHub Comments
Don’t know how but removing the ToggleStoryBook from app.tsx solves the issue. And works smoothly
Hi @Magrider! We have noticed this issue in other cases and what you did by adding a delay does solve the issue. This is a workaround that we are currently recommending. We are trying to figure out why this is happening and we would like to solve it as quickly as possible. Thanks 😃