-
Notifications
You must be signed in to change notification settings - Fork 126
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
states not updating inside card #76
Comments
Also if I set something like this inside
f_name never gets updated value |
@mitjnextt did you ever solve this? |
@ethans333 I found using |
It is because CardStack is comparing the keys of its children (Card) and it only updates the state if they are different. Look into componentDidUpdate in CardStack. Since you only have one Card i guess you can just add 'isLoading' as the key which would make the key change when isLoading changes resulting in a re-render of the Card component. |
same issue can you please give more details... |
Hello @lhandel ,
I really appreciate your work, but I'm having one issue when I update some states it is NOT being updated inside card.
Can you please guide me here
For example, I have one state
loading: true
in constructor,In componentDidMount I set to
loading: false
,But this.state.loading never gets updated value and always returns (It is custom component - Which shows loader)
following is my code:
Here loader always keep loading even if state changes to false
The text was updated successfully, but these errors were encountered: