-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App stops executing next lines of code after network requests #1860
Comments
Hey @ibrahimelaradi, sorry youre experiencing this. Is your component that is observing the mobx properties wrapped in the For example, this won't update: const MyComponent = () => {
const stores = useStores();
return (
<Text>{stores.someStore.observedValue}</Text>
)
} ...but this WILL: const MyComponent = observer(() => {
const stores = useStores();
return (
<Text>{stores.someStore.observedValue}</Text>
)
}) |
Hey @markrickert, all the files I'm using are generated using the CLI and they are by default wrapped inside of |
Hi @ibrahimelaradi out of curiosity can you remove/comment out the ignite/boilerplate/app/app.tsx Lines 58 to 69 in 10efc38
Just in case I had a similar issue and I ended up fixing it by refactoring the file below to use ES6 import instead
|
Hello @carlosa54, I commented out the wrapper and it worked fine, I'll refactor |
🎉 This issue has been resolved in version 7.10.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What's going on?
I'm waiting for network requests to finish before change the state of the app using mobx actions, I'm using generator functions as described in here
Here's a screenshot of logs from Reactotron, there should be a log after the API response that shows the state change
Action:
API method:
I'm experiencing this issue with both Android and iOS, however on Android, if I turn off DEV from
cmd + M > Settings
and reload the app it works perfectly fineI tried running it with minification enabled and the issue still persists, am I doing something wrong?
Steps to reproduce
Will create a reproduction repo if no one has faced this issue before
npx ignite-cli doctor
results:The text was updated successfully, but these errors were encountered: