A framework for building native macOS apps with React.
Перейти к файлу
Valentin Shergin 6a1438c044 Fabric: `Element<>`, a declarative way to describe a component hierarchy
Summary:
`Element` is an abstraction layer that allows describing component hierarchy in a declarative way. Creating `Element`s themself does not create a component tree (aka `ShadowNode` tree) but describes some hierarchical structure that might be used to build an actual component tree (similar to XML Elements).

`Element<>` provides some basic type-safety guarantees: all modifications of element objects require using objects (such as Props or State) of compatible type.

For now, the only useful application of that is building tests.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D19512392

fbshipit-source-id: eb0711c2a537865fa5454dbede53412a135058cf
2020-01-22 11:05:42 -08:00
.appveyor Bump Android NDK to r19c (#25140) 2019-06-04 13:59:36 -07:00
.circleci Use Xcode 11.3.0 and iOS 13.3 in tests (#27783) 2020-01-17 16:42:56 -08:00
.github Added @matt-oakes as CODEOWNER of the ESLint package (#27689) 2020-01-06 16:13:30 -08:00
IntegrationTests v0.115 in xplat/js 2020-01-06 18:06:26 -08:00
Libraries Implement setMostRecentEventCount and setTextAndSelection commands in TextInput 2020-01-22 05:12:11 -08:00
RNTester Upgrade Folly to v2020.01.13.00 (#27810) 2020-01-21 12:44:00 -08:00
React Implement setMostRecentEventCount and setTextAndSelection commands in TextInput 2020-01-22 05:12:11 -08:00
ReactAndroid Don't emit dimensions update event on initial load 2020-01-22 10:16:33 -08:00
ReactCommon Fabric: `Element<>`, a declarative way to describe a component hierarchy 2020-01-22 11:05:42 -08:00
bots Bots cleanup, avoid leaving inline reviews when N>5 (#24923) 2019-05-21 19:38:54 -07:00
docs Generate doc info for RN components 2019-09-19 18:36:25 -07:00
flow Move flow definitions to react-native 2019-12-05 16:06:45 -08:00
flow-typed/npm Convert easy files to flow strict-local 2019-12-05 16:06:46 -08:00
gradle/wrapper Update Gradle wrapper to 6.1 (#27800) 2020-01-17 21:10:42 -08:00
jest exact-by-default in xplat/js 2019-12-09 11:03:21 -08:00
keystores Use fb_native_wrapper for all targets 2018-10-31 11:47:42 -07:00
local-cli Update references to the CLI (#23052) 2019-01-21 09:13:08 -08:00
packages Remove const qualifier from codegened props 2020-01-20 03:41:18 -08:00
scripts Upgrade Folly to v2020.01.13.00 (#27810) 2020-01-21 12:44:00 -08:00
template Update Gradle wrapper to 6.1 (#27800) 2020-01-17 21:10:42 -08:00
third-party-podspecs Upgrade Folly to v2020.01.13.00 (#27810) 2020-01-21 12:44:00 -08:00
tools/build_defs iOS: mark apple_library()'s to target SDK 10 2020-01-14 18:23:49 -08:00
.buckconfig Migrate to FBJNI (#27729) 2020-01-21 02:32:50 -08:00
.buckjavaargs limiting BUCK's memory for CI 2016-02-01 10:49:33 -08:00
.clang-format Moving ObjC specific clang-format rules to the common config 2019-02-11 13:07:09 -08:00
.editorconfig https link to EditorConfig.org (#25267) 2019-06-18 01:58:07 -07:00
.eslintignore Eliminate eslint npm version mismatch warnings and bump some to latest (#23969) 2019-03-19 11:14:30 -07:00
.eslintrc Move error-subclass-name lint rule to GitHub 2019-10-09 11:48:07 -07:00
.flowconfig Deploy Flow v0.116 to xplat 2020-01-16 14:05:49 -08:00
.flowconfig.android Deploy Flow v0.116 to xplat 2020-01-16 14:05:49 -08:00
.gitattributes Added a .gitattributes file, ensuring that Bash script source files (gradlew and 2015-10-13 23:10:39 -04:00
.gitignore Add Android dot files to .gitignore (#27589) 2019-12-26 21:33:34 -08:00
.nvmrc Add .nvmrc + fix node version for eslint 5 compat (#20109) 2018-07-31 02:34:16 -07:00
.prettierrc Set the Prettier config so it is not forced on users of @react-native-community/eslint-config (#24635) 2019-04-29 09:44:51 -07:00
CODE_OF_CONDUCT.md Adopt Contributor Covenant 2019-08-29 23:21:10 -07:00
CONTRIBUTING.md Linking to the ReactJS code of conduct. (#26725) 2019-10-04 10:57:00 -07:00
ECOSYSTEM.md Add document describing the RN ecosystem. (#24493) 2019-04-17 09:06:37 -07:00
LICENSE Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
LICENSE-docs More licenses 2015-03-24 19:59:10 -07:00
README.md Deprecate iOS 9 in readme (#27670) 2020-01-06 21:07:10 -08:00
React-Core.podspec Upgrade Folly to v2020.01.13.00 (#27810) 2020-01-21 12:44:00 -08:00
React.podspec iOS: Deprecate iOS 9 / tvOS 9 SDK support 2020-01-02 12:52:12 -08:00
Releases.md Fix typo in Releases.md (#20487) 2018-08-01 07:16:56 -07:00
build.gradle.kts Update Android Gradle plugin to 3.5.3 (#27462) 2019-12-11 11:27:04 -08:00
cli.js Show full price instead of monthly price within the lead form 2019-03-28 16:07:19 -07:00
gradlew Applied missing changes from bumping Gradle wrapper to 6.0.1 (#27639) 2020-01-13 12:54:08 -08:00
gradlew.bat Update Gradle wrapper to 5.6 (#26079) 2019-08-26 12:13:37 -07:00
index.js Add unstable_enableLogBox 2019-12-10 02:31:38 -08:00
interface.js Move `react-native-implementation.js` to `index.js` 2019-09-12 03:29:51 -07:00
jest-preset.js Delete hasteImpl, providesModuleNodeModules, and modulePathNameMapper (#24811) 2019-06-05 10:55:08 -07:00
jest.config.js Tidy up license headers [3/n] 2019-10-16 10:06:34 -07:00
metro.config.js Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
package.json Upgrade Folly to v2020.01.13.00 (#27810) 2020-01-21 12:44:00 -08:00
react-native.config.js Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
react.gradle fix: Bundle assets in monorepo (#26940) 2019-11-05 03:08:12 -08:00
rn-get-polyfills.js Remove Polyfills from RN Open Source 2019-04-04 15:20:33 -07:00
runXcodeTests.sh Move non-license comments out of license header 2019-10-15 20:12:12 -07:00
settings.gradle.kts Tidy up license headers 2019-10-22 07:46:08 -07:00
template.config.js Tidy up license headers [3/n] 2019-10-16 10:06:34 -07:00
yarn.lock Deploy Flow v0.116 to xplat 2020-01-16 14:05:49 -08:00

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 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.

React Native is developed and supported by many companies and individual core contributors. Find out more in our ecosystem overview.

Contents

📋 Requirements

React Native apps may target iOS 10.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 bug fixes 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.