Replies: 1 comment 2 replies
-
The primary usage is to put resolved values in proxy states. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
This is going to be my first big react native application and i was wondering how we would do promises/async functions with the state. I've tried it with useState(state.pickedCard), I've tried creating an async function that waits until a card is set into the state.pickedCard. I couldn't get anything to work as I intended. Is there a way I can achieve this result?
Is this something that would require a derived state?
Thanks
console.log("before new card " + snap.pickedCard); -> Expected Base (default state is base) state.pickedCard = state.deck.pop(); console.log("After new card " + snap.pickedCard); -> Expected random card from state deck -> actual base/default state
Beta Was this translation helpful? Give feedback.
All reactions