The Wayback Machine - https://web.archive.org/web/20190322181555/https://github.com/facebook/react-native
Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

A framework for building native apps with React.
Branch: master
Clone or download
RCiesielczuk and facebook-github-bot Introduce Module Setup Metric (#23859)
Summary:
The `RCTBridge` contains numerous definitions of notification names, which we can observe in order to get insights into the React Native performance.

The Android implementation is a little different, such that you can listen for any of the [following](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java) marker constants, simply by including the following code:

```java
ReactMarker.addListener(new ReactMarker.MarkerListener() {
  Override
  public void logMarker(ReactMarkerConstants name, Nullable String tag, int instanceKey) {
    Log.d("ReactNativeEvent", "name: "+ name.name() + " tag: " + tag);
  }
});
```
This will allow you to perform the necessary processing, calculations as required.

 ---

This PR enables observing for the module setup event (`RCTDidSetupModuleNotification`) by including the respective module's name & setup time in milliseconds.

[iOS] [Added] - Gain insights on the module setup times by observing `RCTDidSetupModuleNotification`. The `userInfo` dictionary will contain the module name and setup time in milliseconds. These values can be extracted via `RCTDidSetupModuleNotificationModuleNameKey ` and `RCTDidSetupModuleNotificationSetupTimeKey`.
Pull Request resolved: #23859

Differential Revision: D14579066

Pulled By: PeteTheHeat

fbshipit-source-id: 52645127c3fc6aa5bd73e3bd471fccd79cb05c14
Latest commit e2bf843 Mar 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.appveyor add yml to prettier list.Fixes #23426 (#23953) Mar 15, 2019
.circleci Update React Native to use latest CLI (#23940) Mar 18, 2019
.github Use Backlog label to keep issues open (#23789) Mar 12, 2019
IntegrationTests Bump Prettier to 1.16.4 Mar 14, 2019
Libraries Fixed crash when textinput's default value exceeds maxLength (#24084) Mar 22, 2019
RNTester allow HTTP in debug builds (#24066) Mar 20, 2019
React Introduce Module Setup Metric (#23859) Mar 22, 2019
ReactAndroid Switch style getters to JNI fast calls Mar 22, 2019
ReactCommon Implement struct arguments for methods Mar 22, 2019
bots Add SUPPORT document, update other GitHub templates (#23778) Mar 6, 2019
flow-typed/npm remove deprecated utilities Jan 15, 2019
flow Replace our local types by flow-typed (#20320) Dec 20, 2018
gradle/wrapper bump gradle to 5.0, android gradle plugin to 3.3.1 (#23324) Feb 20, 2019
jest - Add openSettings method to Linking module (#23965) Mar 18, 2019
keystores Use fb_native_wrapper for all targets Oct 31, 2018
lib Update copyright headers to yearless format Sep 11, 2018
local-cli Update references to the CLI (#23052) Jan 21, 2019
packages Fix eslint glob for `.test.js` and `.spec.js` files. (#24088) Mar 21, 2019
scripts Add CocoaPods Podfile to the project template (#23563) Mar 22, 2019
template Add CocoaPods Podfile to the project template (#23563) Mar 22, 2019
third-party-podspecs Fabric: working podspecs & works in RNTester (#23803) Mar 16, 2019
tools/build_defs Migration of RN-Android OSS tests to Android X Mar 17, 2019
.buckconfig Bump Android SDK to 28, Build Tools to 28.0.2, Gradle to 4.7, Gradle … Dec 5, 2018
.buckjavaargs limiting BUCK's memory for CI Feb 1, 2016
.clang-format Moving ObjC specific clang-format rules to the common config Feb 11, 2019
.editorconfig editorconfig: Set indent_size for BUCK files to 4 (#21554) Oct 9, 2018
.eslintignore Eliminate eslint npm version mismatch warnings and bump some to latest ( Mar 19, 2019
.eslintrc Rename eslint config to 'eslint-config-react-native-community' (#23718) Mar 4, 2019
.flowconfig remove $FlowFixedInNextDeploy Mar 18, 2019
.flowconfig.android remove $FlowFixedInNextDeploy Mar 18, 2019
.gitattributes Added a .gitattributes file, ensuring that Bash script source files (… Oct 14, 2015
.gitignore Add CocoaPods Podfile to the project template (#23563) Mar 22, 2019
.nvmrc Add .nvmrc + fix node version for eslint 5 compat (#20109) Jul 31, 2018
CODE_OF_CONDUCT.md Update repo documentation to match other Facebook projects Sep 11, 2018
CONTRIBUTING.md Update repo documentation to match other Facebook projects Sep 11, 2018
LICENSE Update copyright headers to yearless format Sep 11, 2018
LICENSE-docs More licenses Mar 25, 2015
README.md Fix broken links in table of contents Readme (#23795) Mar 7, 2019
React.podspec Split React.podspec into separate podspecs for each Xcode project (#2… Feb 22, 2019
Releases.md Fix typo in Releases.md (#20487) Aug 1, 2018
build.gradle bump Gradle Android Plugin to 3.3.2 (#23854) Mar 13, 2019
cli.js Update references to the CLI (#23052) Jan 21, 2019
gradlew fix gradle wrapper issue (#19976) Aug 8, 2018
gradlew.bat Use new JavaScriptCore from npm (#22231) Dec 27, 2018
jest-preset.js chore: update Jest preset to align with Jest 24 (#24062) Mar 20, 2019
jest.config.js extract jest config from package.json (#23638) Feb 26, 2019
package.json js1 upgrade jest adds a caret (^) Mar 21, 2019
react.gradle Fix buildType issue introduced in rebase (#23444) Feb 14, 2019
rn-cli.config.js Update React Native to use latest CLI (#23940) Mar 18, 2019
rn-get-polyfills.js Remove global babelHelpers and regenerator (#21283) Sep 26, 2018
runXcodeTests.sh Update copyright headers to yearless format Sep 11, 2018
settings.gradle Prepare Groovy scripts for Kotlin DSL migration (#23355) Feb 9, 2019
yarn.lock js1 upgrade jest adds a caret (^) Mar 21, 2019

README.md

React Native

Learn once, write anywhere:
Build mobile apps with React.

React Native is released under the MIT license. Current CircleCI build status. Current Appveyor build status. Current npm package version. PRs welcome! Follow @reactnative

Getting Started · Learn the Basics · Showcase · Contribute · Community · Support

React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access to the native platform.

  • Declarative. React makes it painless to create interactive UIs. Declarative views make your code more predictable and easier to debug.
  • Component-Based. Build encapsulated components that manage their own state, then compose them to make complex UIs.
  • Developer Velocity. See local changes in seconds. Changes to JavaScript code can be live reloaded without rebuilding the native app.
  • Portability. Reuse code across iOS, Android, and other platforms.

Contents

📋 Requirements

React Native apps may target iOS 9.0 and Android 4.1 (API 16) or newer. You may use Windows, macOS, or Linux as your development operating system, though building and running iOS apps is limited to macOS. Tools like Expo can be used to work around this.

🎉 Building your first React Native app

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 full documentation for React Native can be found on our website.

The React Native documentation discusses components, APIs, and topics that are specific to React Native. For further documentation on the React API that is shared between React Native and React DOM, refer to the React documentation.

The source for the React Native documentation and website is hosted on a separate repo, @facebook/react-native-website.

🚀 Upgrading

Upgrading to new versions of React Native may give you access to more APIs, views, developer tools and other goodies. See the Upgrading Guide for instructions.

React Native releases are discussed in the React Native Community, @react-native-community/react-native-releases.

👏 How to Contribute

The main purpose of this repository is to continue evolving React Native core. We want to make contributing to this project as easy and transparent as possible, and we are grateful to the community for contributing bugfixes and improvements. 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 bugfixes and improvements, and how to build and test your changes to React Native.

Open Source Roadmap

You can learn more about our vision for React Native in the Roadmap.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Discussions

Larger discussions and proposals are discussed in @react-native-community/discussions-and-proposals.

📄 License

React Native is MIT licensed, as found in the LICENSE file.

React Native documentation is Creative Commons licensed, as found in the LICENSE-docs file.

You can’t perform that action at this time.