Skip to content

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

@wikieswan

Description

@wikieswan

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!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions