useContractEvent Context #3067
Unanswered
Blackglade
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a react application, it would be nice if the
listener
function inuseContractEvent
could have context regarding the rest of the application like current state of a variable defined by the useState hook. Currently whenever I grab a given state variable inside the listener function, I get the default/initial value I set it to, not the current.Can somewhat circumvent this using ref, but it feels messy.
Beta Was this translation helpful? Give feedback.
All reactions