Skip to content
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

How to change component state on Scene event? #39

Open
blazenko opened this issue Aug 20, 2021 · 1 comment
Open

How to change component state on Scene event? #39

blazenko opened this issue Aug 20, 2021 · 1 comment

Comments

@blazenko
Copy link

Hi

is it possible to assign an event listener to a Scene?

Access to events is described here
#2
and here #34
by wrapping Scene's child in a function. This does "give access" to events, but I need to change component state on event, and for that I need to assign a listener, not call a handler directly; because since the wrapper function is inside render(), I can't call state change from there (a React no-no).

How can I accomplish component state change on, say, enter or leave event?

@andychoww
Copy link

solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants