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

Whitelist event listeners to prevent "scene 'on...' is not defined" warning #2530

Closed

Conversation

kesha-antonov
Copy link
Contributor

@kesha-antonov kesha-antonov commented Oct 22, 2017

Hello!

When I open a scene with Actions.scene({ onUpdateSmth: this.myFunc }) or Actions.scene({ onUpdateSmth: undefined }) I get scene "onUpdateSmth" is not defined.

We should use whitelist for events that starts with on.

@kesha-antonov kesha-antonov changed the title Whitelist event listeners to prevent "scene if not defined warning" Whitelist event listeners to prevent "scene 'on...' is not defined warning" Oct 23, 2017
@kesha-antonov kesha-antonov changed the title Whitelist event listeners to prevent "scene 'on...' is not defined warning" Whitelist event listeners to prevent "scene 'on...' is not defined" warning Oct 23, 2017
@onrige
Copy link
Collaborator

onrige commented Oct 24, 2017

Hey. Could you remove package-lock from this PR, please?

@kesha-antonov
Copy link
Contributor Author

Why? It's not in gitignore and it's good practice to keep .lock files.
@onrige

@onrige
Copy link
Collaborator

onrige commented Oct 24, 2017

Sure, but we use yarn (also for this). You can add package-lock to gitignore in commit if you want :)

aksonov pushed a commit that referenced this pull request Oct 26, 2017
@aksonov
Copy link
Owner

aksonov commented Oct 26, 2017

Please check latest master now. I fixed it in different way because you PR would break other functionality (like custom transition shortcuts like onLogin='loginScene')

@kesha-antonov
Copy link
Contributor Author

Ok. Thanks! @aksonov
Works without PR

mvanroon pushed a commit to mvanroon/react-native-router-flux that referenced this pull request Feb 15, 2018
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

Successfully merging this pull request may close these issues.

3 participants