Skip to content

Releases: facebook/react-native

v0.13.0

23 Oct 19:19
@ide ide
Compare
Choose a tag to compare

react-native 0.13.0 is now available on npm.

Note to CocoaPods users:

We are no longer publishing React Native to CocoaPods but are maintaining the Podspec file. What this means is that you still can use CocoaPods to add React Native to your project but will have to make a small change to your Podfile.

Change this:

pod 'React', '~> 0.12'

to this:

pod 'React', :path => 'node_modules/react-native'
# or wherever your copy of react-native is

One reason for this change is that in practice many projects would end up getting two copies of React Native: one from CocoaPods under the Pods directory and one from npm under node_modules. The packager would find two copies of the same JavaScript files and report there was a conflict. So, having just one canonical copy of React Native (under node_modules, with the copy under Pods being a symlink that the packager ignores) resolves this issue.

Centralizing the distribution of React Native through npm also makes it easier for us to release updates since there's only one package repository to work with.

Changes since 0.13.0-rc

  • Merged #3347 to fix a bug with Web Sockets on Android

Changes since 0.12

See the 0.13.0-rc changelog: https://github.com/facebook/react-native/releases/tag/v0.13.0-rc

v0.13.0-rc

13 Oct 22:21
@ide ide
Compare
Choose a tag to compare
v0.13.0-rc Pre-release
Pre-release

261 commits, 73 contributors.

0.13.0-rc has been published to npm, JCenter, 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...
Read more

v0.12.0

09 Oct 05:36
@ide ide
Compare
Choose a tag to compare

List of 418 commits by 79 contributors: 0.11-stable...0.12-stable

v0.11.0

15 Sep 01:15
@ide ide
Compare
Choose a tag to compare

This release includes the initial version of React Native for Android. The official site and docs have been updated with information about the Android version.

Contributors: Moving forward, please include iOS and Android changes in PRs that affect both platforms.

0.11 also includes support for Node 4.0, which was recently released after the Node.js and io.js projects converged. We recommend using nvm to install the latest version of Node. Older versions of Node are not supported.

See the 0.11.0-rc notes for a more detailed change log: https://github.com/facebook/react-native/releases/tag/v0.11.0-rc.

v0.11.0-rc

27 Aug 19:52
@ide ide
Compare
Choose a tag to compare
v0.11.0-rc Pre-release
Pre-release

165 commits, 37 contributors.

0.11.0-rc has been published to npm and CocoaPods.

Breaking Changes

  • Rename RCTReachability to RCTNetInfo: for consistency with Android. The device event that is triggered has also been renamed from reachabilityDidChange to networkDidChange.
  • Internal functions on Animated marked as protected: if you use attach, detach, getAnimatedValue, addChild, removeChild, or getChildren on your Animated components, you will need to update the code to be compatible. This change is in preparation for future optimizations. 059e605
  • RCTRootView's initializer changed: Call the new initializer method, which takes a new initialProperties argument. Use nil if you have no initial properties to pass to the root React component.

Known Issues

  • Packager does not support symlinks: Symlinks under node_modules, for example, are ignored (#637)
  • ScrollView sometimes errs with "Cannot find view with tag #XXX": #1941
  • Numbers in bridged method names crash at launch: #2469

New Features

  • Add support for transparent modal backgrounds: toggle this by using the new transparent prop of Modal.
  • Add support for HSL/HSLA colors
  • Built-in support for handling Keyboard events: you can now add listeners to DeviceEventEmitter for keyboardWillShow, keyboardDidShow, keyboardWillHide, keyboardDidHide, keyboardWillChangeFrame and keyboardDidChangeFrame. (9aefd6b)
  • Built-in support for handling status bar change events: you can now add listeners to DeviceEventEmitter for statusBarFrameDidChange and statusBarFrameWillChange events (eg: if you receive a phonecall, the status bar becomes taller - this allows you to respond accordingly).
  • Touchable handlers now receive event objects: onPressIn etc - these event objects were already initialized so it was just a matter of threading them through.

JavaScript

  • Use GLOBAL.process instead of overwriting: respect any existing process value hanging off of the global object, and only set the env property of it. a4e6419

iOS

  • Pass props when creating a view with RCTViewManager: native module authors will understand that previously it was awkward to set initial properties on a view because props were not available in init and there was no guaranteed order that they would be set in. RCTViewManager classes can now implement viewWithProps:props to better control this.
  • CameraRoll Image Orientation fix: use ALAssetOrientationUp for consistent, predictable orientation.
  • Implemented lazy parsing of method signatures to improve TTI (Time
    to Interact):
    a5e9f83
  • Post to NSNotificationCenter when root views are added or removed: notifications are named RCTUIManagerDidRegisterRootViewNotification and RCTUIManagerDidRemoveRootViewNotification
  • Modernized Objective C syntax: 88e0bbc

Packager

  • Started adding support for System.import (in progress): this is the first step to add support for being able to split JS into multiple bundles. More details: cfcf604
  • Transformer now shows progress bar: The transform step in currently the longest one in the bundling process. This adds a progress bar to track the transform progress. eb248e0
  • More detail on fs log messages: ever wonder why there were two fs event steps in the packager log? f3a165d

Other

  • RCTProfile API now compatible with systrace: 81fdf3e

Bug Fixes

  • Fix TabBarItemIOS image scale: TabBarItemIOS supports setting the scale for base64-encoded images using an optional scale parameter, however this was broken due to the JS code only passing the uri, not the whole source object, to the native side.
  • RedBox now rotates properly: 4382c0e

v0.10.0

26 Aug 23:47
@ide ide
Compare
Choose a tag to compare

react-native 0.10.0 has been published to npm and CocoaPods. Fixes from 0.10-rc include:

  • A bug in css-layout that would cause 100% CPU usage with a specific combination of flex properties has been fixed
  • Removing native event listeners during reconcilation has been fixed
  • The podspec has been fixed to allow you to use both the RCTImage and RCTNetwork subspecs
  • Multiline TextInput components keep their text and cursor within their bounds
  • ReactART has been fixed
  • The shouldRasterizeIOS prop has been fixed to use the screen scale for crisper rendering

v0.10.0-rc

15 Aug 04:29
@ide ide
Compare
Choose a tag to compare
v0.10.0-rc Pre-release
Pre-release

120 commits, 42 contributors.

0.10.0-rc has been published to npm and CocoaPods.

Breaking Changes

  • NSNumber parameters must be marked nonnull: Native bridge methods that take NSNumber values must annotate them using the Objective-C nonnull keyword
  • AnimationExperimental has been removed: Use the JS Animated API or react-motion instead
  • customDirectEventTypes should return an array rather than a dictionary: see 48af214 for details if you depend on this in any of your native component libraries
  • RCTViewNodeProtocol is now RCTComponent: this was done as part of a refactoring of RCTUIManager, similar to above, see deba13f for details if you depend on RCTViewNodeProtocol in any of your native component libraries

Known Issues

  • flexWrap: 'wrap' and flexDirection: 'row' can consume 100% CPU: you may see very high CPU usage and a blank screen with the combination of these styles (#1378)
  • Packager does not support symlinks: Symlinks under node_modules, for example, are ignored (#637)
  • ScrollView sometimes errs with "Cannot find view with tag #XXX": #1941

New Features

JavaScript

  • Modal: A new Modal component that renders its children above the UIViewController that contains your React view. See the UIExplorer for an example.
  • ImageEditingManager: A new module for manipulating images saved to disk. You can crop, translate, and scale images. See the UIExplorer for an example.
  • rebound has been removed: The rebound module, which was internally used by Animated, has been removed to save bytes
  • ES2016 async/await: The async and await keywords have been enabled by default in the packager
  • Configurable JS context name: When using the regular JS runtime (not the Chrome debugger or web view), you can set its name with NativeModules.ContextExecutor.setContextName (iOS 8+ only). This name will show up in Safari's debug menu.
  • process.env.NODE_ENV: This value is defined to be "production" or "development" based on your current environment. Now you can use npm packages that rely on NODE_ENV!

iOS

  • Configurable bundleURL: Setting the bundleURL property on the bridge and reloading the bridge will use the new bundle URL
  • Development status bar: In development mode, a status bar at the top tells you where the JS bundle is being loaded from:
  • RCTBridgeDelegate: The bridge has a delegate for configuring the bundle URL
  • Remove rendered RCTText contents from clipped views: Clipped ListView rows, for example, use less memory when they are off-screen
  • RCTBridge startup is parallelized: Native modules are initialized while the bundle source is loaded from your packager or the disk
  • Faster conversion of JS strings to NSURL objects: Replaced some regex checks in +[RCTConvert NSURL:] with a simpler substring check

Packager

  • Upgrade Babel and regenerator, and fix spurious log messages about "es6.parameters"

Other

  • Flow 0.14.0: Support for Flow 0.14.0 has been added
  • jest 0.5.0: Jest 0.5.0 with io.js 2+ support has been upgraded to the final release

Bug Fixes

  • Support bridged methods that have unnamed parameters, like - (void)method:(int)a :(int)b (b812b0e)
  • Fixed ResponderEventPlugin (e0ea046)
  • Guard against popping past the first route in a Navigator (809a2dc)
  • Fix issue with border width precedence (f2b3057)
  • Maintain the height of inactive Navigator scenes so that the scroll state is unmodified (41dd6fe)
  • Fixed null argument errors for timers and layout animations (95d1fd1)
  • Fixed retain cycle that caused RCTModuleMethods to leak (6a4b83c)
  • Sticky headers in ListViews now receive touches. This was a long-standing bug and a fellow community member stepped up and contributed a fix. Thank you @MattFoley! (#2224)
  • Delay sending touches to JS until dependent (native) gesture recognizers fail (2d66e10)
  • Fixed defaultSource for Image components (#2269)
  • Fixed waring about "invalid context 0x0" when rendering an image of with dimensions of zero area (#2278)
  • Fix crash when using alert() polyfill due to null callback (4d81724)

0.9.0-rc

01 Aug 01:33
Compare
Choose a tag to compare
0.9.0-rc Pre-release
Pre-release

171 commits, 55 contributors.

0.9.0-rc has been published to npm and CocoaPods! There was a short delay for this RC because we wanted to include several breaking changes to Touchable components all at once.

Breaking Changes

  • TouchableX components introduce their own wrapper View: Components like TouchableOpacity and TouchableBounce now use the Animated library to smoothly fade and bounce when touched. A consequence of this is that now we are introducing another View into the hierarchy, because we need to wrap the children in an Animated.View. See the full details and upgrade path here.

We wrote a codemod for fixing many (not all) of the call sites automatically. You can upgrade your code by running the following:

git clone https://github.com/cpojer/js-codemod.git
cd js-codemod/
node_modules/.bin/jscodeshift -t transforms/touchable.js <the folder where your js is>
  • TextInput is now a controlled component: The controlled prop has been removed and TextInput now acts as a controlled component by default. Remove the controlled prop if you were previously using it. (961c1eb). If you were previously using value to set an initial value, now use the initialValue prop instead.

Known Issues

  • Sticky headers do not receive touches: Sticky headers in ListViews don't receive touch events
  • Packager does not support symlinks: Symlinks under node_modules for example are ignored
  • ScrollView sometimes errs with "Cannot find view with tag #XXX": #1941

Deprecations

  • Navigator's onItemRef prop was removed: Use a callback ref directly on the component you return from renderScene instead (4f904b5)

New Features

JavaScript

  • TextInput improvements: TextInput is more reliable and does not drop characters when typing quickly. It also now supports the maxLength prop. (961c1eb)
    rewrite
  • Horizontal ListView: ListViews now check the horizontal prop and calculate layout accordingly (09236cc)
  • Add VerticalUpSwipeJump and VerticalDownSwipeJump to NavigatorSceneConfigs: Check out a demo of it here. (#1822)
  • Text with onPress handlers get highlight: Highlight is the WebKit grey rounded corner background.
    highlight
  • Examples for Image download events in UIExplorer: Check them out here: 74f8055
  • New style properties: perspective, rotateX, rotateY and rotateZ are now available, and a demo of them is available under the Transform example in UIExplorer.
    perspective
  • Add support for files in application home directory: Works as you would expect, application home directory can be referenced with the ~/ prefix. (90dd7a1)
  • Add preventDefault to Navigator events: Gives you more control over your routing (326a66b).
  • tintColor for remote Images: d5943b0
  • Translucent tab bar: Bringing the TabBarIOS api in line with NavigatorIOS, it now supports the translucent prop. (9936a24)
  • Local notification API: PushNotificationIOS now exposes presentLocalNotification and scheduleLocalNotification functions. (a8cb47e)
  • NavigationIOS shadow can be hidden: NavigatorIOS has a new prop called shadowHidden that allows you to hide the hairline shadow (2cb634b)

iOS

  • Add support for gzip of request body: Decoding of response bodies is enabled by default on iOS, this feature will automatically gzip your request body when you to specify the Content-Encoding:gzip header with XMLHttpRequest
  • Use JSONKit if available: If you include JSONKit in your project it will be used by default, which can give a small performance boost in some cases
  • Improvements under the hood to camera roll Images: "Ported over logic where assets are loaded at the optimal size and reloaded if the view size changes" (b34a85f)

Packager

  • More descriptive error messages when a path can't be found: Rather than "Path must be a string. Received null" you will now see "Could not find source file at ..." (70feab9)
  • Chrome debugger automatically reconnects to packager: If the packager is restarted during a Chrome debugging session, the Chrome debugger will automatically reconnect to the packager (fa4c570)

Other

  • The jestSupport folder is published to npm: Provides support files for jest testing

Bug Fixes

  • "RCTImageDownloader was ignoring server response codes. When receiving a response other than 200 it would treat this as success, meaning the image would never load, nor report failure." (d1a82c4)
  • Disable focus on TextInput with editable set to false (5006eca)
  • Set allowsEdgeAntialiasing for transformed views, fixes jagged edges when using the transform property. (see the smooth edges in the transform example above)
  • Fixed crash when app is reloaded while profiling is active
  • Properly free JavaScript executors when app is reloaded (f2d65ea)
  • Pin Babel version to ensure nothing breaks between releases, eg: the spread operator caused some issues in a minor version.

v0.8.0

24 Jul 22:19
@ide ide
Compare
Choose a tag to compare

0.8.0 has been published to npm and CocoaPods. The major features of this release are the Animated library and the move from Node to io.js.

0.9.0-rc is scheduled for next Friday once some small breaking changes to the Touchable components are all merged.

The changes for this release are covered in the 0.8.0-rc and 0.8.0-rc.2 release notes (0.8.0 is the same as 0.8.0-rc.2).

marquee and blink will never die!

v0.8.0-rc.2

17 Jul 20:46
@ide ide
Compare
Choose a tag to compare
v0.8.0-rc.2 Pre-release
Pre-release

v.0.8.0-rc.2 includes a few commits to improve the stability of the next release.

  • Reverted removal of layout-only UIViews and a related fix for sticky headers in scroll views
  • Fixed TextInput so it no longer mutates props; it no longer warns in development
  • Fixed ListView crash related to getting its scroll responder