-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
is it possible to create a custom Scene instead of use original Scene? #3208
Comments
i try this, but got an error:
|
i read the source code . I found the |
You can try the Could you also check if the idea below works? (I haven't actually tested it - and typed it here in the input off the top of my head - it might have errors or typos - help me out on that to get the whole idea behind it 😉). CustomScene
Adding a |
@daviscabral thanks! I have tried your idea, but it still doesn't work. |
IGNORE THIS ANSWERUse the other one I answered below please. #3208 (comment) I believe the way for doing that (since
|
I haven't tried this method yet, maybe it's feasible, but I don't think there is any difference between this method and the way that the onEnter event is added directly on the Scene, and this implementation is intrusive to the component. I am not sure if such demand is universal, if it is, as you said, Adding a unified onEnter on the Router may be a better solution. |
HoC is also a solution.
|
But yeah - something on the |
HoC is good solution, closing this ticket |
I want to handle some things in a unified way when the scene trigger
onEnter
, like:then use it:
Is this feasible?
The text was updated successfully, but these errors were encountered: