Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.android.js 1.1KB

1234567891011121314151617181920212223242526
  1. // The type field of react-native application loader's React Element is created
  2. // as number and not Symbol, because it's not been defined by the polyfill yet.
  3. // We import the application renderer, before Symbol is defined, in order to use
  4. // number types as well. Otherwise this will result in the invariant exception,
  5. // because fiber thingy will not recognise root react-native component as React
  6. // Element, but as an Object.
  7. //
  8. // See node_modules/react-native/Libraries/polyfills/babelHelpers.js
  9. // :babelHelpers.createRawReactElement - that's where first react-native element
  10. // is created (super early - it's the app loader).
  11. //
  12. // See node_modules/react-native/Libraries/Renderer/ReactNativeFiber-dev.js
  13. // and look for REACT_ELEMENT_TYPE definition - it's defined later when Symbol
  14. // has been defined and type will not match.
  15. //
  16. // As an alternative solution we could stop using/polyfilling Symbols and
  17. // replace with classpath string constants or some kind of a wrapper around
  18. // that.
  19. import 'react-native/Libraries/ReactNative/renderApplication';
  20. // Android doesn't provide Symbol
  21. import 'es6-symbol/implement';
  22. import './react/index.native';