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

StackNav variable in MainStackRouter.js is promotion to global #117

Open
wikieswan opened this issue Jul 25, 2017 · 1 comment
Open

StackNav variable in MainStackRouter.js is promotion to global #117

wikieswan opened this issue Jul 25, 2017 · 1 comment
Labels

Comments

@wikieswan
Copy link

wikieswan commented Jul 25, 2017

in MainStackRouter.js file

export default (StackNav = StackNavigator({
  Login: { screen: Login },
  Home: { screen: Home },
  BlankPage: { screen: BlankPage }
}));

the variable StackNav is not declared before,so it will be promoted to global object.

if I add 'use strict' in this file, compile will go wrong!

ExceptionsManager.js:63 StackNav is not defined

I proposal that it can be:

let StackNav = StackNavigator({
  Login: { screen: Login },
  Home: { screen: Home },
  BlankPage: { screen: BlankPage }
})
export default StackNav;

thx!!

@wikieswan wikieswan changed the title StackNav Variable in MainStackRouter.js StackNav variable in MainStackRouter.js is promotion to global Jul 25, 2017
@SupriyaKalghatgi
Copy link
Collaborator

@wikieswan Very soon we will upgrade Native Starter Kit to the latest of React, React NativeandNativeBase`
With refactored code

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

No branches or pull requests

2 participants