diff --git a/releases/0.47/docs/accessibility.html b/releases/0.47/docs/accessibility.html index b8dbb0db472..f04432abbcb 100644 --- a/releases/0.47/docs/accessibility.html +++ b/releases/0.47/docs/accessibility.html @@ -1,4 +1,4 @@ -
Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.
In addition to this documentation, you might find this blog post about React Native accessibility to be useful.
When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component. By default, all touchable elements are accessible.
On Android, ‘accessible={true}’ property for a react-native View will be translated into native ‘focusable={true}’.
Both iOS and Android provide APIs for making apps accessible to people with disabilities. In addition, both platforms provide bundled assistive technologies, like the screen readers VoiceOver (iOS) and TalkBack (Android) for the visually impaired. Similarly, in React Native we have included APIs designed to provide developers with support for making apps more accessible. Take note, iOS and Android differ slightly in their approaches, and thus the React Native implementations may vary by platform.
In addition to this documentation, you might find this blog post about React Native accessibility to be useful.
When true, indicates that the view is an accessibility element. When a view is an accessibility element, it groups its children into a single selectable component. By default, all touchable elements are accessible.
On Android, ‘accessible={true}’ property for a react-native View will be translated into native ‘focusable={true}’.
In the above example, we can't get accessibility focus separately on 'text one' and 'text two'. Instead we get focus on a parent view with 'accessible' property.
When a view is marked as accessible, it is a good practice to set an accessibilityLabel on the view, so that people who use VoiceOver know what element they have selected. VoiceOver will read this string when a user selects the associated element.
To use, set the accessibilityLabel property to a custom string on your View:
Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The +
Sometimes it's useful to know whether or not the device has a screen reader that is currently active. The
AccessibilityInfo API is designed for this purpose. You can use it to query the current state of the
screen reader as well as to register to be notified when the state of the screen reader changes.
Here's a small example illustrating how to use AccessibilityInfo:
Display an iOS action sheet. The options object must contain one or more
+
Display an iOS action sheet. The options object must contain one or more
of:
options (array of strings) - a list of button titles (required)cancelButtonIndex (int) - index of cancel button in optionsdestructiveButtonIndex (int) - index of destructive button in optionstitle (string) - a title to show above the action sheetmessage (string) - a message to show below the titleDisplay the iOS share sheet. The options object should contain
one or both of message and url and can additionally have
a subject or excludedActivityTypes:
url (string) - a URL to sharemessage (string) - a message to sharesubject (string) - a subject for the messageexcludedActivityTypes (array) - the activities to exclude from the ActionSheetNOTE: if url points to a local file, or is a base64-encoded
diff --git a/releases/0.47/docs/activityindicator.html b/releases/0.47/docs/activityindicator.html
index 0def0af572e..5aeabdebabe 100644
--- a/releases/0.47/docs/activityindicator.html
+++ b/releases/0.47/docs/activityindicator.html
@@ -1,4 +1,4 @@
-
Displays a circular loading indicator.
Whether to show the indicator (true, the default) or hide it (false).
Size of the indicator (default is 'small'). +
Displays a circular loading indicator.
Whether to show the indicator (true, the default) or hide it (false).
Size of the indicator (default is 'small'). Passing a number to the size prop is only supported on Android.
Whether the indicator should hide when not animating (true by default).
You can edit the content above on GitHub and send us a pull request!
AdSupport provides access to the "advertising identifier". If you link this library
+
AdSupport provides access to the "advertising identifier". If you link this library
in your project, you may need to justify your use for this identifier when submitting
your application to the App Store.
In order to use AdSupport in your project, you must link the RCTAdSupport library.
In Xcode, you can manually add the RCTAdSupport.m and RCTAdSupport.h files from
diff --git a/releases/0.47/docs/alert.html b/releases/0.47/docs/alert.html
index ac0b7eace53..c0573c1fb22 100644
--- a/releases/0.47/docs/alert.html
+++ b/releases/0.47/docs/alert.html
@@ -1,4 +1,4 @@
-
Launches an alert dialog with the specified title and message.
Optionally provide a list of buttons. Tapping any button will fire the +
Launches an alert dialog with the specified title and message.
Optionally provide a list of buttons. Tapping any button will fire the respective onPress callback and dismiss the alert. By default, the only button will be an 'OK' button.
This is an API that works both on iOS and Android and can show static alerts. To show an alert that prompts the user to enter some information, diff --git a/releases/0.47/docs/alertios.html b/releases/0.47/docs/alertios.html index 8ebd84fa739..1bfec57c199 100644 --- a/releases/0.47/docs/alertios.html +++ b/releases/0.47/docs/alertios.html @@ -1,4 +1,4 @@ -
AlertIOS provides functionality to create an iOS alert dialog with a
+
AlertIOS provides functionality to create an iOS alert dialog with a
message or create a prompt for user input.
Creating an iOS alert:
This page only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.
Assuming you have the Android SDK installed, run android to open the Android SDK Manager.
Make sure you have the following installed:
build.gradle)build.gradle)Step 1: Set environment variables through your local shell.
Note: Files may vary based on shell flavor. See below for examples from common shells.
.bash_profile or .bashrc.zprofile or .zshrc.profile or $ENVExample:
This page only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
You will need to build React Native from source if you want to work on a new feature/bug fix, try out the latest features which are not released yet, or maintain your own fork with patches that cannot be merged to the core.
Assuming you have the Android SDK installed, run android to open the Android SDK Manager.
Make sure you have the following installed:
build.gradle)build.gradle)Step 1: Set environment variables through your local shell.
Note: Files may vary based on shell flavor. See below for examples from common shells.
.bash_profile or .bashrc.zprofile or .zshrc.profile or $ENVExample:
Step 2: Create a local.properties file in the android directory of your react-native app with the following contents:
Example:
You can find further instructions on the official page.
First, you need to install react-native from your fork. For example, to install the master branch from the official repo, run the following:
Alternatively, you can clone the repo to your node_modules directory and run npm install inside the cloned repo.
Add gradle-download-task as dependency in android/build.gradle:
The Animated library is designed to make animations fluid, powerful, and
+
The Animated library is designed to make animations fluid, powerful, and
easy to build and maintain. Animated focuses on declarative relationships
between inputs and outputs, with configurable transforms in between, and
simple start/stop methods to control time-based animation execution.
The simplest workflow for creating an animation is to to create an diff --git a/releases/0.47/docs/animations.html b/releases/0.47/docs/animations.html index ae311c76e61..d870c572118 100644 --- a/releases/0.47/docs/animations.html +++ b/releases/0.47/docs/animations.html @@ -1,4 +1,4 @@ -
Animations are very important to create a great user experience. +
Animations are very important to create a great user experience. Stationary objects must overcome inertia as they start moving. Objects in motion have momentum and rarely come to a stop immediately. Animations allow you to convey physically believable motion in your interface.
React Native provides two complementary animation systems: diff --git a/releases/0.47/docs/appregistry.html b/releases/0.47/docs/appregistry.html index 138b8cc56d3..5f030a71c44 100644 --- a/releases/0.47/docs/appregistry.html +++ b/releases/0.47/docs/appregistry.html @@ -1,4 +1,4 @@ -
This API only works in projects made with react-native init
diff --git a/releases/0.47/docs/appstate.html b/releases/0.47/docs/appstate.html
index 9164fb78340..e16e6df91e9 100644
--- a/releases/0.47/docs/appstate.html
+++ b/releases/0.47/docs/appstate.html
@@ -1,4 +1,4 @@
-
AppState can tell you if the app is in the foreground or background,
+
AppState can tell you if the app is in the foreground or background,
and notify you when the state changes.
AppState is frequently used to determine the intent and proper behavior when handling push notifications.
active - The app is running in the foregroundbackground - The app is running in the background. The user is either
in another app or on the home screeninactive - This is a state that occurs when transitioning between
diff --git a/releases/0.47/docs/asyncstorage.html b/releases/0.47/docs/asyncstorage.html
index 7f6ded3e8ac..e26908bb619 100644
--- a/releases/0.47/docs/asyncstorage.html
+++ b/releases/0.47/docs/asyncstorage.html
@@ -1,4 +1,4 @@
-AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage
+
AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage
system that is global to the app. It should be used instead of LocalStorage.
It is recommended that you use an abstraction on top of AsyncStorage
instead of AsyncStorage directly for anything more than light usage since
it operates globally.
On iOS, AsyncStorage is backed by native code that stores small values in a
diff --git a/releases/0.47/docs/backandroid.html b/releases/0.47/docs/backandroid.html
index 82f90479a0f..c2054ea188a 100644
--- a/releases/0.47/docs/backandroid.html
+++ b/releases/0.47/docs/backandroid.html
@@ -1,4 +1,4 @@
-
Detect hardware button presses for back navigation.
Android: Detect hardware back button presses, and programmatically invoke the default back button +
Detect hardware button presses for back navigation.
Android: Detect hardware back button presses, and programmatically invoke the default back button functionality to exit the app if there are no listeners or if none of the listeners return true.
tvOS: Detect presses of the menu button on the TV remote. (Still to be implemented: programmatically disable menu button handling functionality to exit the app if there are no listeners or if none of the listeners return true.)
iOS: Not applicable.
The event subscriptions are called in reverse order (i.e. last registered subscription first), diff --git a/releases/0.47/docs/building-for-apple-tv.html b/releases/0.47/docs/building-for-apple-tv.html index 2ec03b7704f..23554c8343e 100644 --- a/releases/0.47/docs/building-for-apple-tv.html +++ b/releases/0.47/docs/building-for-apple-tv.html @@ -1,4 +1,4 @@ -
This page only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
Apple TV support has been implemented with the intention of making existing React Native iOS applications "just work" on tvOS, with few or no changes needed in the JavaScript code for the applications.
The RNTester app supports Apple TV; use the RNTester-tvOS build target to build for tvOS.
Native layer: React Native Xcode projects all now have Apple TV build targets, with names ending in the string '-tvOS'.
react-native init: New React Native projects created with react-native init will have Apple TV target automatically created in their XCode projects.
JavaScript layer: Support for Apple TV has been added to Platform.ios.js. You can check whether code is running on AppleTV by doing
This page only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
Apple TV support has been implemented with the intention of making existing React Native iOS applications "just work" on tvOS, with few or no changes needed in the JavaScript code for the applications.
The RNTester app supports Apple TV; use the RNTester-tvOS build target to build for tvOS.
Native layer: React Native Xcode projects all now have Apple TV build targets, with names ending in the string '-tvOS'.
react-native init: New React Native projects created with react-native init will have Apple TV target automatically created in their XCode projects.
JavaScript layer: Support for Apple TV has been added to Platform.ios.js. You can check whether code is running on AppleTV by doing
General support for tvOS: Apple TV specific changes in native code are all wrapped by the TARGET_OS_TV define. These include changes to suppress APIs that are not supported on tvOS (e.g. web views, sliders, switches, status bar, etc.), and changes to support user input from the TV remote or keyboard.
Common codebase: Since tvOS and iOS share most Objective-C and JavaScript code in common, most documentation for iOS applies equally to tvOS.
Access to touchable controls: When running on Apple TV, the native view class is RCTTVView, which has additional methods to make use of the tvOS focus engine. The Touchable mixin has code added to detect focus changes and use existing methods to style the components properly and initiate the proper actions when the view is selected using the TV remote, so TouchableHighlight and TouchableOpacity will "just work". In particular:
touchableHandleActivePressIn will be executed when the touchable view goes into focustouchableHandleActivePressOut will be executed when the touchable view goes out of focustouchableHandlePress will be executed when the touchable view is actually selected by pressing the "select" button on the TV remote.TV remote/keyboard input: A new native class, RCTTVRemoteHandler, sets up gesture recognizers for TV remote events. When TV remote events occur, this class fires notifications that are picked up by RCTTVNavigationEventEmitter (a subclass of RCTEventEmitter), that fires a JS event. This event will be picked up by instances of the TVEventHandler JavaScript object. Application code that needs to implement custom handling of TV remote events can create an instance of TVEventHandler and listen for these events, as in the following code:
A basic button component that should render nicely on any platform. Supports +
A basic button component that should render nicely on any platform. Supports a minimal level of customization.

If this button doesn't look right for your app, you can build your own diff --git a/releases/0.47/docs/cameraroll.html b/releases/0.47/docs/cameraroll.html index 565c13c81ed..cf295e1b0e8 100644 --- a/releases/0.47/docs/cameraroll.html +++ b/releases/0.47/docs/cameraroll.html @@ -1,4 +1,4 @@ -
CameraRoll provides access to the local camera roll / gallery.
+
CameraRoll provides access to the local camera roll / gallery.
Before using this you must link the RCTCameraRoll library.
You can refer to Linking for help.
The user's permission is required in order to access the Camera Roll on devices running iOS 10 or later.
Add the NSPhotoLibraryUsageDescription key in your Info.plist with a string that describes how your
diff --git a/releases/0.47/docs/clipboard.html b/releases/0.47/docs/clipboard.html
index 26fbeb608fa..d5024ce298d 100644
--- a/releases/0.47/docs/clipboard.html
+++ b/releases/0.47/docs/clipboard.html
@@ -1,4 +1,4 @@
-
Clipboard gives you an interface for setting and getting content from Clipboard on both iOS and Android
Get content of string type, this method returns a Promise, so you can use following code to get clipboard content
Clipboard gives you an interface for setting and getting content from Clipboard on both iOS and Android
Get content of string type, this method returns a Promise, so you can use following code to get clipboard content
Set content of string type. You can use following code to set clipboard content
Components in React Native are styled using JavaScript. Color properties usually match how CSS works on the web.
React Native supports rgb() and rgba() in both hexadecimal and functional notation:
'#f0f' (#rgb)'#ff00ff' (#rrggbb)
'rgb(255, 0, 255)'
'rgba(255, 255, 255, 1.0)'
'#f0ff' (#rgba)
'#ff00ff00' (#rrggbbaa)hsl() and hsla() is supported in functional notation:
'hsl(360, 100%, 100%)''hsla(360, 100%, 100%, 1.0)'transparent #This is a shortcut for rgba(0,0,0,0):
'transparent'You can also use color names as values. React Native follows the CSS3 specification:
You can edit the content above on GitHub and send us a pull request!
Components in React Native are styled using JavaScript. Color properties usually match how CSS works on the web.
React Native supports rgb() and rgba() in both hexadecimal and functional notation:
'#f0f' (#rgb)'#ff00ff' (#rrggbb)
'rgb(255, 0, 255)'
'rgba(255, 255, 255, 1.0)'
'#f0ff' (#rgba)
'#ff00ff00' (#rrggbbaa)hsl() and hsla() is supported in functional notation:
'hsl(360, 100%, 100%)''hsla(360, 100%, 100%, 1.0)'transparent #This is a shortcut for rgba(0,0,0,0):
'transparent'You can also use color names as values. React Native follows the CSS3 specification:
You can edit the content above on GitHub and send us a pull request!
This page only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
In Integrating with Existing Apps guide and Native UI Components guide we learn how to embed React Native in a native component and vice versa. When we mix native and React Native components, we'll eventually find a need to communicate between these two worlds. Some ways to achieve that have been already mentioned in other guides. This article summarizes available techniques.
React Native is inspired by React, so the basic idea of the information flow is similar. The flow in React is one-directional. We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this with properties: data is passed from a parent to its children in a top-down manner. If an ancestor component relies on the state of its descendant, one should pass down a callback to be used by the descendant to update the ancestor.
The same concept applies to React Native. As long as we are building our application purely within the framework, we can drive our app with properties and callbacks. But, when we mix React Native and native components, we need some special, cross-language mechanisms that would allow us to pass information between them.
Properties are the simplest way of cross-component communication. So we need a way to pass properties both from native to React Native, and from React Native to native.
In order to embed a React Native view in a native component, we use RCTRootView. RCTRootView is a UIView that holds a React Native app. It also provides an interface between native side and the hosted app.
RCTRootView has an initializer that allows you to pass arbitrary properties down to the React Native app. The initialProperties parameter has to be an instance of NSDictionary. The dictionary is internally converted into a JSON object that the top-level JS component can reference.
This page only applies to projects made with react-native init or to those made with Create React Native App which have since ejected. For more information about ejecting, please see the guide on the Create React Native App repository.
In Integrating with Existing Apps guide and Native UI Components guide we learn how to embed React Native in a native component and vice versa. When we mix native and React Native components, we'll eventually find a need to communicate between these two worlds. Some ways to achieve that have been already mentioned in other guides. This article summarizes available techniques.
React Native is inspired by React, so the basic idea of the information flow is similar. The flow in React is one-directional. We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this with properties: data is passed from a parent to its children in a top-down manner. If an ancestor component relies on the state of its descendant, one should pass down a callback to be used by the descendant to update the ancestor.
The same concept applies to React Native. As long as we are building our application purely within the framework, we can drive our app with properties and callbacks. But, when we mix React Native and native components, we need some special, cross-language mechanisms that would allow us to pass information between them.
Properties are the simplest way of cross-component communication. So we need a way to pass properties both from native to React Native, and from React Native to native.
In order to embed a React Native view in a native component, we use RCTRootView. RCTRootView is a UIView that holds a React Native app. It also provides an interface between native side and the hosted app.
RCTRootView has an initializer that allows you to pass arbitrary properties down to the React Native app. The initialProperties parameter has to be an instance of NSDictionary. The dictionary is internally converted into a JSON object that the top-level JS component can reference.
React Native provides a number of built-in components. You will find a full list of components and APIs on the sidebar to the left. If you're not sure where to get started, take a look at the following categories:
You're not limited to the components and APIs bundled with React Native. React Native is a community of thousands of developers. If you're looking for a library that does something specific, search the npm registry for packages mentioning react-native, or check out Awesome React Native for a curated list.
Most apps will end up using one of these basic components. You'll want to get yourself familiarized with all of these if you're new to React Native.
React Native provides a number of built-in components. You will find a full list of components and APIs on the sidebar to the left. If you're not sure where to get started, take a look at the following categories:
You're not limited to the components and APIs bundled with React Native. React Native is a community of thousands of developers. If you're looking for a library that does something specific, search the npm registry for packages mentioning react-native, or check out Awesome React Native for a curated list.
Most apps will end up using one of these basic components. You'll want to get yourself familiarized with all of these if you're new to React Native.
The most fundamental component for building a UI.
diff --git a/releases/0.47/docs/contributing.html b/releases/0.47/docs/contributing.html index bf3297b47f2..0054853c11d 100644 --- a/releases/0.47/docs/contributing.html +++ b/releases/0.47/docs/contributing.html @@ -1,5 +1,4 @@ -React Native is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody using Facebook's mobile apps. We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
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.
Some of the core team will be working directly on GitHub. These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
We will do our best to keep master in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and version appropriately so you can lock into a specific version if need be.
To see what changes are coming and provide better feedback to React Native contributors, use the latest release candidate when possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
We are using GitHub Issues for our public bugs. Before filing a new task, try to make sure your problem doesn't already exist.
Questions and feature requests are tracked elsewhere:
The best way to get your bug fixed is to provide a reduced test case. Please provide either a Snack or a public repository with a runnable example.
Please report a single bug per issue. Always provide reproduction steps. You can use Snack in many cases to demonstrate an issue. If the bug cannot be reproduced using Snack, verify that the issue can be reproduced locally by targeting the latest release candidate. Ideally, check if the issue is present in master as well.
Do not forget to include sample code that reproduces the issue. Only open issues for bugs affecting either the latest stable release, or the current release candidate, or master (see the list of versions). If it is not clear from your report that the issue can be reproduced in one of these releases, your issue will be closed.
We're not able to provide support through GitHub Issues. If you're looking for help with your code, consider asking on Stack Overflow.
Facebook has a bounty program for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
One great way you can contribute to the project without writing any code is to help triage issues and pull requests as they come in. Ask for more information if the issue does not provide all the details required by the template. Suggest labels. Flag issues that are stale or that should be closed. Ask for test plans and review code.
Adding labels, closing and reopening issues, and merging pull requests is, as you may expect, limited to a subset of contributors. Simply commenting on the issue or pull request can still go a long way towards helping us keep the number of outstanding issues under control.
The Facebook GitHub Bot allows certain active members of the community to perform administrative actions such as labeling and closing issues. The list of community members with this kind of access can be found at the top of IssueCommands.txt. The bot can be triggered by adding any of the following commands as a standalone comment on an issue:
@facebook-github-bot close: Closes an issue without providing a particular explanation.@facebook-github-bot label (.*): Use this command to add a label, such as "iOS" or "Android", to an issue.@facebook-github-bot duplicate (#[0-9]+): Marks an issue as a duplicate. Requires a issue number to be provided. The bot will close the issue.@facebook-github-bot stack-overflow: Mark issues that do not belong in the bug tracker, and redirect to Stack Overflow. The bot will close the issue after adding the For Stack Overflow label.@facebook-github-bot feature: Use this when an issue describes a feature request, as opposed to a reproducible bug. The bot will point the author to the feature request tracker, add the Feature Request label, then close the issue.@facebook-github-bot expected: Use this when an issue describes a type of expected behavior. The bot will close the issue.@facebook-github-bot answered: Use this when an issue appears to be a question that has already been answered by someone on the thread. The bot will close the issue.@facebook-github-bot no-reply: Use this when an issue requires more information from the author but they have not added a comment in over two weeks. The bot will close the issue.@facebook-github-bot reopen: Re-opens a previously closed issue.@facebook-github-bot bugfix: Mark issues that describe a reproducible bug. The bot will prompt the author to submit a pull request with a fix.@facebook-github-bot icebox: Use this when an issue has been open for over 30 days with no activity. The bot will close the issue after adding the Icebox label.Additionally, the following commands can be used on a pull request:
@facebook-github-bot cla: Remind the author that the CLA needs to be signed.@facebook-github-bot shipit: Flag the PR for merging. If used by a core contributor, the bot will attempt to import the pull request. In general, core contributors are those who have consistently submitted high quality contributions to the project.Many React Native users are active on Stack Overflow. If you want to get a general sense of what React Native folks talk about, check out the React Native Community Facebook group. There is also an active community of React and React Native users on the Discord chat platform in case you need help.
The React Native team sends out periodical updates through the following channels:
Core contributors to React Native meet monthly and post their meeting notes on the React Native blog. You can also find ad hoc discussions in the React Native Core Contributors Facebook group.
If you intend to change the public API, or make any non-trivial changes to the implementation, we recommend filing an issue. This lets us reach an agreement on your proposal before you put significant effort into it.
If you're only fixing a bug, it's fine to submit a pull request right away but we still recommend to file an issue detailing what you're fixing. This is helpful in case we don't accept that specific fix but want to keep track of the issue.
Working on your first Pull Request? You can learn how from this free video series:
How to Contribute to an Open Source Project on GitHub
To help you get your feet wet and get you familiar with our contribution process, we have a list of beginner friendly issues that contain bugs which are fairly easy to fix. This is a great place to get started.
If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don't accidentally duplicate your effort.
If somebody claims an issue but doesn't follow up for more than two weeks, it's fine to take over it but you should still leave a comment.
If you send a pull request, please do it against the master branch. We maintain stable branches for stable releases separately but we don't accept pull requests to them directly. Instead, we cherry-pick non-breaking changes from master to the latest stable version.
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Before submitting a pull request, please make sure the following is done…
master.node linter.js <files touched>).Note: It is not necessary to keep clicking
Merge master to your branchon the PR page. You would want to merge master if there are conflicts or tests are failing. The Facebook-GitHub-Bot ultimately squashes all commits to a single one before merging your PR.
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website.
website/README.md)See "What is a Test Plan?" to learn more: -https://medium.com/@martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
Make sure all tests pass on both Travis and Circle CI. PRs that break tests are unlikely to be merged.
You can learn more about running tests and contributing to React Native next.
When adding a new breaking change, follow this template in your pull request:
React Native is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody using Facebook's mobile apps. We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
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.
Some of the core team will be working directly on GitHub. These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
We will do our best to keep master in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and version appropriately so you can lock into a specific version if need be.
To see what changes are coming and provide better feedback to React Native contributors, use the latest release candidate when possible. By the time a release candidate is released, the changes it contains will have been shipped in production Facebook apps for over two weeks.
Many React Native users are active on Stack Overflow. If you want to get a general sense of what React Native folks talk about, check out the React Native Community Facebook group. There is also an active community of React and React Native users on the Discord chat platform in case you need help.
The React Native team sends out periodical updates through the following channels:
Core contributors to React Native meet monthly and post their meeting notes on the React Native blog. You can also find ad hoc discussions in the React Native Core Contributors Facebook group.
We are using GitHub Issues for our public bugs. Before filing a new task, try to make sure your problem doesn't already exist.
Questions and feature requests are tracked elsewhere:
When opening a new issue, always make sure to fill out the issue template. This step is very important! Not doing so may result in your issue getting closed. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
master. The bug may have already been fixed!We're not able to provide support through GitHub Issues. If you're looking for help with your code, consider asking on Stack Overflow or reaching out to the community through other channels.
Facebook has a bounty program for the safe disclosure of security bugs. With that in mind, please do not file public issues; go through the process outlined on that page.
Working on your first Pull Request? You can learn how from this free video series:
How to Contribute to an Open Source Project on GitHub
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.
If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don't accidentally duplicate your effort.
If somebody claims an issue but doesn't follow up for more than two weeks, it's fine to take over it but you should still leave a comment.
If you send a pull request, please do it against the master branch. We maintain stable branches for stable releases separately but we don't accept pull requests to them directly. Instead, we cherry-pick non-breaking changes from master to the latest stable version.
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Before submitting a pull request, please make sure the following is done…
master.npm run lint).Note: It is not necessary to keep clicking
Merge master to your branchon the PR page. You would want to merge master if there are conflicts or tests are failing. The Facebook-GitHub-Bot ultimately squashes all commits to a single one before merging your PR.
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website.
See What is a Test Plan? to learn more.
Make sure all tests pass on both Travis and Circle CI. PRs that break tests are unlikely to be merged.
You can learn more about running tests and contributing to React Native next.
When adding a new breaking change, follow this template in your pull request:
If you've added a new module, add a @providesModule <moduleName> at the end of the comment. This will allow the haste package manager to find it.
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.
Complete your CLA here: https://code.facebook.com/cla
Our linter will catch most styling issues that may exist in your code. You can check the status of your code styling by simply running node linter.js <files touched>.
However, there are still some styles that the linter cannot pick up.
'use strict';' over "setTimeout and setInterval" over ' for string literal props{} of props should hug their values (no spaces)> of opening tags on the same line as the last prop/> of self-closing tags on their own line and left-align them with the opening <@property declarationsif, on the same line- method, @interface, and @implementation brackets on the following line* operator goes with the variable name (e.g. NSObject *variableName;)By contributing to React Native, you agree that your contributions will be licensed under its BSD license.
Read the next section to learn how to test your changes.
You can edit the content above on GitHub and send us a pull request!
Opens the standard Android date picker dialog.
Opens the standard Android date picker dialog.
Use DatePickerIOS to render a date/time picker (selector) on iOS. This is
+
Use DatePickerIOS to render a date/time picker (selector) on iOS. This is
a controlled component, so you must hook in to the onDateChange callback
and update the date prop in order for the component to update, otherwise
the user's change will be reverted immediately to reflect props.date as the
diff --git a/releases/0.47/docs/debugging.html b/releases/0.47/docs/debugging.html
index ede957f1592..d68cf439c30 100644
--- a/releases/0.47/docs/debugging.html
+++ b/releases/0.47/docs/debugging.html
@@ -1,4 +1,4 @@
-