70913a4623
Summary: @public This sync includes the following changes: - **[ca0941fce](https://github.com/facebook/react/commit/ca0941fce)**: Add regression test for Placeholder fallbacks with lifecycle methods (#13254) //<Andrew Clark>// - **[a32c727f2](https://github.com/facebook/react/commit/a32c727f2)**: Optimize readContext for Subsequent Reads of All Bits (#13248) //<Sebastian Markbåge>// - **[2b509e2c8](https://github.com/facebook/react/commit/2b509e2c8)**: [Experimental] API for reading context from within any render phase function (#13139) //<Andrew Clark>// - **[5776fa3fc](https://github.com/facebook/react/commit/5776fa3fc)**: Update www warning shim (#13244) //<Dan Abramov>// - **[3d3506d37](https://github.com/facebook/react/commit/3d3506d37)**: Include Modes in the component stack (#13240) //<Dan Abramov>// - **[71b4e9990](https://github.com/facebook/react/commit/71b4e9990)**: [react-test-renderer] Jest matchers for async tests (#13236) //<Andrew Clark>// - **[2c560cb99](https://github.com/facebook/react/commit/2c560cb99)**: Fix unwinding starting with a wrong Fiber on error in the complete phase (#13237) //<Dan Abramov>// - **[ead08827d](https://github.com/facebook/react/commit/ead08827d)**: Add more flexibility in testing errors in begin/complete phases (#13235) //<Dan Abramov>// - **[e4e58343e](https://github.com/facebook/react/commit/e4e58343e)**: Move unstable_yield to main export (#13232) //<Andrew Clark>// - **[0e235bb8f](https://github.com/facebook/react/commit/0e235bb8f)**: Removed unused state argument in unsubscribe method of <Subscription /> (#13233) //<Mateusz Burzyński>// - **[236f60872](https://github.com/facebook/react/commit/236f60872)**: Fail tests if toWarnDev() does not wrap warnings in array (#13227) //<Dan Abramov>// - **[acbb4f93f](https://github.com/facebook/react/commit/acbb4f93f)**: Remove the use of proxies for synthetic events in DEV (#13225) //<Dan Abramov>// - **[171e0b7d4](https://github.com/facebook/react/commit/171e0b7d4)**: Fix “no onChange handler” warning to fire on falsy values ("", 0, false) too (#12628) //<Nicole Levy>// - **[606c30aa5](https://github.com/facebook/react/commit/606c30aa5)**: fixed a typo in commentout in ReactFiberUnwindWork.js (#13172) //<Fumiya Shibusawa>// - **[9f78913b2](https://github.com/facebook/react/commit/9f78913b2)**: Update prettier (#13205) //<Johan Henriksson>// - **[6d3e26288](https://github.com/facebook/react/commit/6d3e26288)**: Remove unnecessary `typeof` checks (#13196) //<jddxf>// - **[82c7ca4cc](https://github.com/facebook/react/commit/82c7ca4cc)**: Add component stacks to some warnings (#13218) //<Dan Abramov>// - **[21ac62c77](https://github.com/facebook/react/commit/21ac62c77)**: Fix a portal unmounting crash for renderers with distinct Instance and Container (#13220) //<Thibault Malbranche>// - **[d6a0626b3](https://github.com/facebook/react/commit/d6a0626b3)**: Set current fiber during before-mutation traversal (#13219) //<Dan Abramov>// - **[f9358c51c](https://github.com/facebook/react/commit/f9358c51c)**: Change warning() to automatically inject the stack, and add warningWithoutStack() as opt-out (#13161) //<Dan Abramov>// - **[467d13910](https://github.com/facebook/react/commit/467d13910)**: Enforce presence or absence of component stack in tests (#13215) //<Dan Abramov>// - **[43ffae2d1](https://github.com/facebook/react/commit/43ffae2d1)**: Suspending inside a constructor outside of strict mode (#13200) //<Andrew Clark>// - **[659a29cec](https://github.com/facebook/react/commit/659a29cec)**: Reorganize how shared internals are accessed (#13201) //<Dan Abramov>// - **[58f3b29d9](https://github.com/facebook/react/commit/58f3b29d9)**: Added SSR/hydration tests for modes, forwardRef, and Profiler (#13195) //<Brian Vaughn>// - **[1c89cb62f](https://github.com/facebook/react/commit/1c89cb62f)**: Use ReactDebugCurrentFrame.getStackAddendum() in element validator (#13198) //<Dan Abramov>// - **[e6076ecf4](https://github.com/facebook/react/commit/e6076ecf4)**: Remove ad-hoc forks of getComponentName() and fix it (#13197) //<Dan Abramov>// - **[32f6f258b](https://github.com/facebook/react/commit/32f6f258b)**: Remove event simulation of onChange events (#13176) //<Philipp Spieß>// - **[9ca37f843](https://github.com/facebook/react/commit/9ca37f843)**: docs: update comments (#13043) //<Sen Yang>// - **[f89f25f47](https://github.com/facebook/react/commit/f89f25f47)**: Correct type of `ref` in forwardRef render() (#13100) //<Moti Zilberman>// - **[7b99ceabe](https://github.com/facebook/react/commit/7b99ceabe)**: Deprecate test utils mock component follow up (#13194) //<Brian Vaughn>// - **[6ebc8f3c0](https://github.com/facebook/react/commit/6ebc8f3c0)**: Add support for re-entrant SSR stacks (#13181) //<Dan Abramov>// - **[d64d1ddb5](https://github.com/facebook/react/commit/d64d1ddb5)**: Deprecate ReactTestUtils.mockComponent() (#13193) //<Brian Vaughn>// - **[e79366d54](https://github.com/facebook/react/commit/e79366d54)**: Link create-subscription doc to GH issue with de-opt explanation (#13187) //<Brian Vaughn>// - **[1f32d3c6d](https://github.com/facebook/react/commit/1f32d3c6d)**: Test renderer flushAll method verifies an array of expected yields (#13174) //<Brian Vaughn>// - **[377e1a049](https://github.com/facebook/react/commit/377e1a049)**: Add a test for SSR stack traces (#13180) //<Dan Abramov>// - **[96d38d178](https://github.com/facebook/react/commit/96d38d178)**: Fix concatenation of null to a warning message (#13166) //<Dan Abramov>// - **[095dd5049](https://github.com/facebook/react/commit/095dd5049)**: Add DEV warning if forwardRef function doesn't use the ref param (#13168) //<Brian Vaughn>// - **[566259567](https://github.com/facebook/react/commit/566259567)**: Refactor stack handling (no functional changes) (#13165) //<Dan Abramov>// - **[ebbd22143](https://github.com/facebook/react/commit/ebbd22143)**: Configure react-test-renderer as a secondary (#13164) //<Brandon Dail>// - **[ddc91af79](https://github.com/facebook/react/commit/ddc91af79)**: Decrease nested update limit from 1000 to 50 (#13163) //<Andrew Clark>// - **[3596e40b3](https://github.com/facebook/react/commit/3596e40b3)**: Fix nested update bug (#13160) //<Andrew Clark>// - **[449f6ddd5](https://github.com/facebook/react/commit/449f6ddd5)**: create a new FeatureFlags file for test renderer on www (#13159) //<Chang Yan>// - **[f762b3abb](https://github.com/facebook/react/commit/f762b3abb)**: Run react-dom SSR import test in jsdom-less environment (#13157) //<Dan Abramov>// - **[6f6b560a6](https://github.com/facebook/react/commit/6f6b560a6)**: Renamed selfBaseTime/treeBaseTime Fiber attributes to selfBaseDuration/treeBaseDuration (#13156) //<Brian Vaughn>// - **[1386ccddd](https://github.com/facebook/react/commit/1386ccddd)**: Fix ReferenceError when requestAnimationFrame isn't defined (#13152) //<Dan Abramov>// - **[f5779bbc1](https://github.com/facebook/react/commit/f5779bbc1)**: Run server rendering test on bundles (#13153) //<Dan Abramov>// - **[9faf389e7](https://github.com/facebook/react/commit/9faf389e7)**: Reset profiler timer correctly after errors (#13123) //<Brian Vaughn>// - **[85fe4ddce](https://github.com/facebook/react/commit/85fe4ddce)**: Fix - issue #12765 / the checked attribute is not initially set on the input (#13114) //<XuMM_12>// - **[07fefe333](https://github.com/facebook/react/commit/07fefe333)**: Drop handling for ms and O prefixes for CSS transition and animation events. (#13133) //<Rouven Weßling>// - **[88d7ed8bf](https://github.com/facebook/react/commit/88d7ed8bf)**: React.Timeout -> React.Placeholder (#13105) //<Andrew Clark>// - **[f128fdea4](https://github.com/facebook/react/commit/f128fdea4)**: Suspending outside of strict trees and async trees (#13098) //<Andrew Clark>// - **[aa8266c4f](https://github.com/facebook/react/commit/aa8266c4f)**: Prepare placeholders before timing out (#13092) //<Andrew Clark>// - **[c039c16f2](https://github.com/facebook/react/commit/c039c16f2)**: Fix this in a functional component for ShallowRenderer (#13144) //<Toru Kobayashi>// - **[64e1921aa](https://github.com/facebook/react/commit/64e1921aa)**: Fix Flow type that event target can be null (#13124) //<Sebastian Markbåge>// - **[6d6de6011](https://github.com/facebook/react/commit/6d6de6011)**: Add PROFILE bundles for www+DOM and fbsource+RN/RF (#13112) //<Brian Vaughn>// - **[71a60ddb1](https://github.com/facebook/react/commit/71a60ddb1)**: Add link to another article about React renderers //<Dan Abramov>// - **[6a530e3ba](https://github.com/facebook/react/commit/6a530e3ba)**: adding check for mousemove (#13090) //<Jason Williams>// - **[c35a1e748](https://github.com/facebook/react/commit/c35a1e748)**: Fix crash during server render in react 16.4.1. (#13088) //<Dustin Masters>// - **[076bbeace](https://github.com/facebook/react/commit/076bbeace)**: Fall back to 'setTimeout' when 'requestAnimationFrame' is not called (#13091) //<Flarnie Marchan>// - **[da5c87bdf](https://github.com/facebook/react/commit/da5c87bdf)**: Fixes children when using dangerouslySetInnerHtml in a selected <option> (#13078) //<Michael Ridgway>// - **[a960d18bc](https://github.com/facebook/react/commit/a960d18bc)**: eliminate unnecessary do-while loop in renderRoot() (#13087) //<Nathan Quarles>// - **[5b3d17a5f](https://github.com/facebook/react/commit/5b3d17a5f)**: setting a flag, so that the first movement will have the correct value (#13082) //<Jason Williams>// - **[b0f60895f](https://github.com/facebook/react/commit/b0f60895f)**: Automatically Profile roots when DevTools is present (#13058) //<Brian Vaughn>// - **[ae8c6dd53](https://github.com/facebook/react/commit/ae8c6dd53)**: remove some redundant lines (#13077) //<Nathan Quarles>// - **[0fcf92d06](https://github.com/facebook/react/commit/0fcf92d06)**: Add a link to custom renderer intro article //<Dan Abramov>// - **[97af3e1f3](https://github.com/facebook/react/commit/97af3e1f3)**: Do not add additional work to a batch that is already rendering (#13072) //<Andrew Clark>// - **[4fe6eec15](https://github.com/facebook/react/commit/4fe6eec15)**: Always batch updates of like priority within the same event (#13071) //<Andrew Clark>// - **[8e87c139b](https://github.com/facebook/react/commit/8e87c139b)**: Remove transitive dependency on fbjs (#13075) //<Dan Abramov>// - **[aeda7b745](https://github.com/facebook/react/commit/aeda7b745)**: Remove fbjs dependency (#13069) //<Dan Abramov>// - **[b1b3acbd6](https://github.com/facebook/react/commit/b1b3acbd6)**: Inline fbjs/lib/emptyObject (#13055) //<Dan Abramov>// Release Notes: [GENERAL] [FEATURE] [React] - React sync for revisions ae14317...ca0941f Reviewed By: bvaughn Differential Revision: D8979192 fbshipit-source-id: 7a14d3b0a253a81d162d7f8c899e99cf6ac4fee4 |
||
---|---|---|
.circleci | ||
.github | ||
ContainerShip | ||
IntegrationTests | ||
Libraries | ||
RNTester | ||
React | ||
ReactAndroid | ||
ReactCommon | ||
ReactNative | ||
bots | ||
flow | ||
flow-github | ||
gradle/wrapper | ||
jest | ||
keystores | ||
lib | ||
local-cli | ||
react-native-cli | ||
react-native-git-upgrade | ||
scripts | ||
third-party-podspecs | ||
.buckconfig | ||
.buckjavaargs | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.flowconfig | ||
.gitattributes | ||
.gitignore | ||
.npmignore | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
DockerTests.md | ||
Jenkinsfile | ||
LICENSE | ||
LICENSE-docs | ||
README.md | ||
React.podspec | ||
Releases.md | ||
appveyor.yml | ||
build.gradle | ||
cli.js | ||
gradlew | ||
gradlew.bat | ||
jest-preset.json | ||
package.json | ||
react.gradle | ||
rn-cli.config.js | ||
rn-get-polyfills.js | ||
runXcodeTests.sh | ||
settings.gradle | ||
setupBabel.js |
README.md
React Native ·
Learn once, write anywhere: Build mobile apps with React.
- Build native mobile apps using JavaScript and React: React Native lets you build mobile apps using only JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components.
- A React Native app is a real mobile app: With React Native, you don't build a "mobile web app", an "HTML5 app", or a "hybrid app". You build a real mobile app that's indistinguishable from an app built using Objective-C, Java, or Swift. React Native uses the same fundamental UI building blocks as regular iOS and Android apps. You just put those building blocks together using JavaScript and React.
- Don't waste time recompiling: React Native lets you build your app faster. Instead of recompiling, you can reload your app instantly. With hot reloading, you can even run new code while retaining your application state. Give it a try - it's a magical experience.
- Use native code when you need to: React Native combines smoothly with components written in Objective-C, Java, or Swift. It's simple to drop down to native code if you need to optimize a few aspects of your application. It's also easy to build part of your app in React Native, and part of your app using native code directly - that's how the Facebook app works.
The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native.
See the official React Native website for an introduction to React Native.
Supported operating systems are >= Android 4.1 (API 16) and >= iOS 8.0.
Getting Started
Follow the Getting Started guide. The recommended way to install React Native depends on your project. Here you can find short guides for the most common scenarios:
Documentation
The website’s documentation is divided into multiple sections.
- There are Guides that discuss topics like debugging, integrating with existing apps, and the gesture responder system.
- The Components section covers React components such as
View
andButton
. - The APIs section covers other libraries like Animated and StyleSheet that aren’t React components themselves.
- Finally, React Native provides a small number of Polyfills that offer web-like APIs.
Another great way to learn more about the components and APIs included with React Native is to read their source. Look under the Libraries/Components
directory for components like ScrollView
and TextInput
, for example. The RNTester example is also here to demonstrate some of the ways to use these components. From the source you can get an accurate understanding of each component’s behavior and API.
The React Native documentation only discusses the components, APIs and topics specific to React Native (React on iOS and Android). For further documentation on the React API that is shared between React Native and React DOM, refer to the React documentation.
Upgrading
React Native is under active development. See the guide on upgrading React Native to keep your project up-to-date.
Contributing
Read below to learn how you can take part in improving React Native.
Code of Conduct
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
Contributing Guide
Read our contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes to React Native.
Beginner Friendly Bugs
We have a list of beginner friendly issues to help you get your feet wet in the React Native codebase and familiar with our contribution process. This is a great place to get started.
License
React Native is MIT licensed.
React Native documentation is Creative Commons licensed.