Skip to content

Stateful Canvas Events Factory? #2979

Answered by CodyJasonBennett
arcasoy asked this question in Q&A
Discussion options

You must be logged in to vote

This is what R3F does internally, store coming from useStore:

// Store events internally
if (events && !state.events.handlers) state.set({ events: events(store) })

You can also do partial updates with the setEvents method. Perhaps that's the best way for this case.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@arcasoy
Comment options

@CodyJasonBennett
Comment options

Answer selected by arcasoy
@arcasoy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants