Skip to content

[Packager] require('react-native') must be assigned to React #1479

@alinz

Description

@alinz

By accident I have assigned require('react-native') to a variable other than React and It failed to execute. hmmm...

This code works fine

var React = require('react-native');

var {
  Component,
  View
} = React;

class MyApp extends Component {
  render() {
    return (
      <View></View>
    );
  }
}

module.exports = MyApp;

By this one doesn't

var Test = require('react-native');

var {
  Component,
  View
} = Test;

class MyApp extends Component {
  render() {
    return (
      <View></View>
    );
  }
}

module.exports = MyApp;

Here's what I got as an error:
screen shot 2015-06-01 at 1 47 47 pm

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions