native-starter-kit icon indicating copy to clipboard operation
native-starter-kit copied to clipboard

StackNav variable in MainStackRouter.js is promotion to global

Open wikieswan opened this issue 8 years ago • 1 comments

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 avatar Jul 25 '17 15:07 wikieswan

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

SupriyaKalghatgi avatar Aug 16 '17 07:08 SupriyaKalghatgi