-
Notifications
You must be signed in to change notification settings - Fork 5.6k
🚨 [Do Not Merge] Refactoring The New Architecture Guide #3029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cipolleschi
merged 1 commit into
facebook:feat/new-architecture-guide-refactoring
from
cipolleschi:refactor/the-new-architecture
Mar 29, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
docs/the-new-architecture/backward-compatibility-fabric-components.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| id: backward-compatibility-fabric-components | ||
| title: Fabric Components as Native Components | ||
| --- | ||
|
|
||
| This section describes the required steps to ensure that a Fabric Component can be used as a Native Component. | ||
|
|
||
| The section should explain: | ||
|
|
||
| - How to avoid installing dependencies when they are not needed | ||
| - The usage of compilation pragmas to avoid compiling code that requires types from the codegen | ||
| - API uniformity in JS, so that they don’t have to import different files |
6 changes: 6 additions & 0 deletions
6
docs/the-new-architecture/backward-compatibility-troubleshooting.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| id: backward-compatibility-troubleshooting | ||
| title: Troubleshooting | ||
| --- | ||
|
|
||
| This section contains solutions to common problems that can happen when developing a backward compatible module or component. |
12 changes: 12 additions & 0 deletions
12
docs/the-new-architecture/backward-compatibility-turbomodules.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| id: backward-compatibility-turbomodules | ||
| title: TurboModules as Native Modules | ||
| --- | ||
|
|
||
| This section describes the required steps to ensure that a TurboModule can be used as a Native Module. | ||
|
|
||
| The section explains: | ||
|
|
||
| - How to avoid installing dependencies when they are not needed | ||
| - The usage of compilation pragmas to avoid compiling code that requires types from the codegen | ||
| - API uniformity in JS, so that they don’t have to import different files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| id: backward-compatibility | ||
| title: What Backward Compatibility Is | ||
| --- | ||
|
|
||
| This section contains a brief paragraph explaining why library developers should be mindful about backward compatibility. | ||
|
|
||
| It could contains shared section between the backward compatibility for TurboModules and Native Components. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| id: landing-page | ||
| title: Introduction | ||
| --- | ||
|
|
||
| This section is the entry point for the new guide’s documentation. | ||
| It contains some basic information about the New Architecture: its pillars, the version from which it has been made available and other very high-level information. Then, it should present the guide’s structure itself. | ||
|
|
||
| This section should also contains a sort of Driving guide based on the user use-cases: | ||
|
|
||
| - New user: link to how to use the new [app template](use-app-template) | ||
| - New Library developer: link to the [pillars](pillars) | ||
| - Old library developer/app developer: link to [the migration guide](../new-architecture-intro) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| id: pillars-fabric-components | ||
| title: Fabric Components | ||
| --- | ||
|
|
||
| This section contains a high-level introduction to Fabric components. It provides enough context to understand when a Fabric component is needed and how it roughly works. | ||
| It points to the [Renderer](https://reactnative.dev/architecture/fabric-renderer) section of the [Architecture](https://reactnative.dev/architecture/overview) tab for a deep dive into the technical details. | ||
|
|
||
| This section must have a warning that it works only with the new architecture enabled. It points to the [migration section](../new-architecture-intro). | ||
|
|
||
| ## How to Create a Fabric Components | ||
|
|
||
| This section is a step-by-step guide to create a Fabric component from scratch. The list of subsections is roughly: | ||
|
|
||
| - JS spec (with all the supported features) | ||
| - Configuration (package.json, cocoapods, gradle, …) and CodeGen | ||
| - Native code (one section for iOS and one for Android) | ||
| - Integration in an App (`yarn add` and how to connect the JS specs to the app itself) | ||
| - Troubleshooting (common issues and how to solve them) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| id: pillars-turbomodules | ||
| title: TurboModules | ||
| --- | ||
|
|
||
| This section contains a high-level introduction to TurboModules. It provides enough context to understand when a TurboModule is needed and how it roughly works. | ||
|
|
||
| This section must have a warning that it works only with the new architecture enabled. It points to the [migration section](../new-architecture-intro). | ||
|
|
||
| ## How to create a Turbomodule | ||
|
|
||
| This section is a step-by-step guide to create a TurboModule from scratch. The list of subsections is roughly: | ||
|
|
||
| - JS spec (with all the supported features) | ||
| - Configuration (package.json, cocoapods, gradle, …) and CodeGen | ||
| - Native code (one section for iOS and one for Android) | ||
| - Integration in an App (`yarn add` and how to connect the JS specs to the app itself) | ||
| - Troubleshooting (common issues and how to solve them) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| id: pillars | ||
| title: What Compose the New Architecture | ||
| --- | ||
|
|
||
| This section recalls the main pillars from the new-architecture-intro section. | ||
|
|
||
| It contains a pointer to the `Migration` section and it specifies that these pillars work only when the new architecture is enabled. It also points to the prerequisites. | ||
|
|
||
| It describes how the following sections are organized. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| id: use-app-template | ||
| title: Using the New App Template | ||
| --- | ||
|
|
||
| This section describes the new app template generated by the React Native CLI and how to use it properly. | ||
| It should explain how to create a new app, which command should be issued to install the dependencies and to run it on the different platforms. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| id: why | ||
| title: Why A New Architecture | ||
| --- | ||
|
|
||
| This section briefly explains why we decided to move away from the old architecture, and it describes succinctly the main benefits of adopting the new architecture. | ||
| It points to the [Architecture](https://reactnative.dev/architecture/overview) tab of the website for a deep dive into the ‘why’s. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.