A framework for building native macOS apps with React.
Перейти к файлу
MaeIg 5f05b07d02 Extract RootTag case of translateTypeAnnotation from the flow and typescript folders in parsers-primitives (#34901)
Summary:
This PR aims to reduce code duplication by extracting `emitRootTag` logic from the flow and typescript folders into a shared parsers-primitives file. It is a task of https://github.com/facebook/react-native/issues/34872:
> Extract the content of the case 'RootTag' (Flow TypeScript) into a single emitRootTag function in the parsers-primitives.js file. Use the new function in the parsers.

~~Note that https://github.com/facebook/react-native/issues/34898 should be merged first. I rebased on it's branch.~~

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Extract RootTag case of translateTypeAnnotation from the flow and typescript folders in parsers-primitives

Pull Request resolved: https://github.com/facebook/react-native/pull/34901

Test Plan:
All tests are passing, with `yarn jest react-native-codegen`:
<img width="934" alt="image" src="https://user-images.githubusercontent.com/40902940/194777150-6136c1b6-11f8-4e21-829b-fda418b6925c.png">

Reviewed By: cipolleschi

Differential Revision: D40212553

Pulled By: cipolleschi

fbshipit-source-id: eadbbfb5cf6dfa6c966f4c08a5d9372a3470b621
2022-10-10 04:23:30 -07:00
.bundle
.circleci Add hermes/create-tarball.js script (#34875) 2022-10-07 10:21:25 -07:00
.github
IntegrationTests
Libraries hook up offscreen api to runApplication 2022-10-07 18:13:04 -07:00
React Fix MoveAcross pointer event test for iOS 2022-10-07 12:07:19 -07:00
ReactAndroid Track observed pointer-events using a single bitset 2022-10-07 04:44:48 -07:00
ReactCommon Fix warnings around mixing int and size_t usage in unsafe ways (#34889) 2022-10-06 16:25:44 -07:00
docs
flow
flow-typed/npm
gradle
jest
keystores
local-cli
packages Extract RootTag case of translateTypeAnnotation from the flow and typescript folders in parsers-primitives (#34901) 2022-10-10 04:23:30 -07:00
repo-config build: Bump ws to 6.2.2 due to ReDoS vulnerability (#34759) 2022-10-10 02:58:40 -07:00
scripts introduce SKIP_BUNDLING_METRO_IP to skip ip.txt generation (#31829) 2022-10-10 01:26:29 -07:00
sdks/hermes-engine Exclude Hermes debugger in release builds 2022-10-05 09:19:05 -07:00
template
third-party-podspecs
tools Specify command to regenerate bundled sort-imports ESLint rule 2022-10-06 09:40:09 -07:00
types Fix TypeScript tests 2022-10-06 06:54:05 -07:00
.buckconfig
.buckjavaargs
.clang-format
.editorconfig
.eslintignore
.eslintrc.js
.flowconfig
.flowconfig.android
.gitignore
.node-version
.prettierrc
.ruby-version
BUCK
CHANGELOG.md add 0.70.2 changelog (#34859) 2022-10-05 03:42:33 -07:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ECOSYSTEM.md
Gemfile
Gemfile.lock
LICENSE
LICENSE-docs
README.md
React-Core.podspec
React.podspec
build.gradle.kts
cli.js
gradle.properties
gradlew
gradlew.bat
index.js Refactor Systrace module 2022-10-05 15:17:53 -07:00
interface.js
jest-preset.js
jest.config.js
metro.config.js
package.json build: Bump ws to 6.2.2 due to ReDoS vulnerability (#34759) 2022-10-10 02:58:40 -07:00
react-native.config.js
react.gradle
rn-get-polyfills.js
runXcodeTests.sh
settings.gradle.kts
template.config.js
yarn.lock build: Bump ws to 6.2.2 due to ReDoS vulnerability (#34759) 2022-10-10 02:58:40 -07: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 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 12.4 and Android 5.0 (API 21) 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 this discussion repo.

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