React Native v0.13.0-rc released

v0.13.0-rc on GitHub (npm, CocoaPods)

0.13.0-rc has been published to npm, Center, and CocoaPods.

The 0.13 release includes preliminary support for installing react-native with npm 3 and running the packager on Windows. Please understand they might not work as well as they do with npm 2 on Mac yet, since this is the first release that supports them.

A note about Windows as a dev environment: As RN iOS requires a Mac and most of the programmers at Facebook and the RN developers use Macs, support for OS X is a top priority. However, we would like to support developers using Linux and Windows too. We believe we'll get the best Windows support from people using Windows on a daily basis. So to begin with, Windows support for the development environment is an ongoing community responsibility. This can mean filing issues and submitting PRs, and we'll help review and merge them. We are looking forward to your contributions and appreciate your patience.

Breaking Changes

  • setImmediate batching: React updates (e.g. setState) scheduled with setImmediate are now batched. Most apps will notice only a performance improvement, but it may reveal bugs in code that was relying on the precise timing semantics of React during setImmediate processing. 4c74f01
  • Node 4.0: This is not a new requirement but we have made it more visible: #2547 #3296
  • ScrollView's keyboardShouldPersistTaps defaults to false: 166a96b
  • Warn when style props are not under style: make sure properties like width or backgroundColor are specified in the style prop. 2ea3b93
  • Flow 0.17: Flow has been upgraded. 49a0ae7
  • Removed RCTCache on iOS: 63a37be
  • Remove header_mappings_dir from Podspec so that all header files are flattened when installing with CocoaPods. This improves compatibility with react-native-fbsdk, for example: #3248

Known Issues

New Features

JavaScript

  • const is enabled by default: #2955
  • import is enabled by default: #3175
  • Number.EPSILON/MIN_SAFE_INTEGER/MAX_SAFE_INTEGER are polyfilled: de717a8
  • Animate to hex and named colors: instead of rgba syntax you now can use hex or names like "black" in Animated output ranges. #3177
  • processColor is faster: babdeb3
  • New Switch component that wraps iOS and Android's switch components: 36cbe74
  • Preserve original globals before polyfilling them: If the JS environment supports a global property like fetch, it will still be polyfilled but the original implementation will be saved as originalFetch. This lets you do things like assign global.fetch = originalFetch if you want to use Chrome's built-in fetch when debugging in Chrome. #3293
  • Export the different Navigator navigation styling for iOS and Android and a new navigationStyles prop: #3028

iOS

  • Pause JS runloop: Pause the CADisplayLink when there are no JS tasks to process to conserve energy. e727fc8
  • Use bundleForClass instead of mainBundle when looking up resources: 9076b71
  • Disable RCTAssert completely in production builds: 6ca8f48
  • Inline Images: Image components can be children of Text components. Note that all properties of the image except its source are ignored. 91e6c98
  • Optimize loading local JS bundles from the filesystem: 7fe7a2a

Android

  • Autoplay GIFs: Fixed #2997
  • Enable background initialization of ReactApplicationContext: dcae4ba
  • Remote images in ToolbarAndroid: 5ca5ec7
  • borderWidth and borderColor on Images: 2cc8acf
  • New ViewPagerAndroid component that provides paginated scrolling. Check out the example in the UIExplorer to see how it works and how to use it. 0a41965
  • New WebSocket support on Android with an API similar to the iOS version: #2839
  • Add a ProGuard config: a7b23df

Packager

  • Reject module collisions: If you are using the Facebook-proprietary @providesModule pragma, the packager will now explicitly reject collisions: 9293e54 502d277

Other

  • Refactored React Native attribute reconcilation: 6c5024e 8e3ce0f ac5b754
  • Use platform-independent dir separator in Android build file: #2961
  • CLI has --verbose flag to debug slow project initialization. You will need to update your global npm package for react-native-cli to get this feature. #3193
  • Packager server is more modular and split into several middleware. This doesn't affect users of RN but should make it a little nicer for contributors. 35f9ac8 f37ad56 f980c33 22e88f2 0a835b7 42d7563
  • Lots of documentation updates. A thank you to the contributors!

Bug Fixes

  • End iOS Slider interaction when touches are cancelled: 8f13560
  • Clear images only if they have been removed from the view hierarchy: previously images were removed even if they were moved within the view hierarchy. a4ef7ab
  • Multiline JS import statements are now parsed: #1939
  • JS WebSockets implement EventTarget: #2599
  • Preserve Android React instance when handling exceptions: 3dcc234
  • Set scrollsToTop = NO for RCTTextInput placeholders: #3129
  • Cancel pending timeouts when Touchable components are unmounted: #1152
  • Support npm packages that require package.json: #2949
  • Better error message when loading non-existent image URIs on iOS: #3127
  • Check if Android React instance is destroyed when adding profiling option to dev menu: 787895e
  • Make sure ListView call onEndReached even when there are very few rows: b0bdd4e
  • Protect against Android SQLLiteFullExceptions for AsyncStorage: ea8d0b6
  • Fix touches when the Android keyboard is visible: c805157
  • Fix crash due to thread-unsafe race condition on iOS when reloading: cb8b656
  • Use correct spans in Android shadow Text nodes: 9f1dab6