You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Website Documentation before releasing 0.80 (#1069)
## Description
### Why
What is the motivation for this change? Add a few sentences describing
the context and overall goals of the pull request's commits.
It's regarding the PR we recently reverted, we need to add some part of
it back in website.
#1057Resolves#1068
## Screenshots
Add any relevant screen captures here from before or after your changes.
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1069)
---------
Co-authored-by: Jon Thysell <jthysell@microsoft.com>
Copy file name to clipboardExpand all lines: docs/flyout-component-windows.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,4 +99,4 @@ Accepted placements value types are:
99
99
100
100
## Examples
101
101
102
-
Examples can be found in the [React Native Gallery App](https://github.com/microsoft/react-native-gallery/blob/main/src/examples/FlyoutExamplePage.tsx) available in the [Microsoft Store](http://aka.ms/reactnativegalleryapp)
102
+
Examples can be found in the [React Native Gallery App](https://github.com/microsoft/react-native-gallery/blob/main/src/examples/FlyoutExamplePage.tsx) available in the [Microsoft Store](https://apps.microsoft.com/detail/9NPG0B292H4R)
Copy file name to clipboardExpand all lines: docs/getting-started.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,6 @@ Make sure you have installed all of the [development dependencies](rnw-dependenc
11
11
12
12
For information around how to set up React Native, see the [React Native Getting Started Guide](https://reactnative.dev/docs/getting-started).
13
13
14
-
> **Interested in migrating to [React Native's New Architecture](https://reactnative.dev/architecture/landing-page)?** New Architecture support in React Native for Windows is now available to preview in 0.76. Note there are several key changes, so if you’d like to be an early adopter, check out the information in the [New Architecture Guide](new-architecture.md).
15
-
16
14
## Create a new React Native project
17
15
18
16
Call the following from the place where you want your project directory to live:
@@ -70,7 +68,9 @@ Lastly, initialize the React Native for Windows application with the [init-windo
70
68
npx react-native init-windows --overwrite
71
69
```
72
70
73
-
> **Note:** RNW templates contain a customized `metro.config.js` file, which is meant to merge cleanly into the default config provided by the standard React Native project template. If you are starting a new app, overwriting `metro.config.js` should have no impact. However, if you are adding Windows to an existing app with an already modified `metro.config.js` file, please make sure to back up and re-apply your modifications after adding RNW.
71
+
> **Architecture Note:** The default React Native for Windows template for *new* projects targets [React Native's New Architecture](https://reactnative.dev/architecture/landing-page). For more information, including options for continuing to use the Old Architecture, see [New vs. Old Architecture](new-architecture.md).
72
+
73
+
> **Metro Note:** React Native Windows overwrites the app project's `metro.config.js` file to enable Windows support. If you are starting a new project, overwriting React Native's default `metro.config.js` should have no impact. However, if you have previously modified your `metro.config.js` file, please make sure to back up and re-apply your modifications after adding React Native Windows.
|`--template`| string | Specify the template to use |
28
+
|`--template`| string | Specify the template to use (default: `old/uwp-cpp-app`)|
27
29
|`--name`| string | The native project name. Defaults to the name property in `app.json` or `package.json`|
28
30
|`--namespace`| string | The native project namespace, expressed using dots as separators, i.e. `Level1.Level2.Level3`. Defaults to the same as name |
29
31
|`--overwrite`| boolean | Overwrite any existing files without prompting |
30
32
|`--no-telemetry`| boolean | Disables sending telemetry that allows analysis of usage and failures of the react-native-windows CLI |
33
+
|`--list`|| Shows a list with all available templates with their descriptions. |
31
34
|`-h`, `--help`| boolean | Display help for command |
32
35
36
+
### Default Options and Re-initializing Projects
37
+
38
+
After running, the `init-windows` command will save the `name`, `namespace` and `template` configuration in the project's `package.json`:
39
+
40
+
```json
41
+
"react-native-windows": {
42
+
"init-windows": {
43
+
"name": "MyApp",
44
+
"namespace": "MyApp",
45
+
"template": "old/uwp-cpp-app"
46
+
}
47
+
}
48
+
```
49
+
50
+
If you later repeat the `init-windows` command to re-initialize a Windows project, without specifying any of those options, the command will default to any saved values. Among other things, this means you can safely re-run `init-windows` without it automatically changing your project to a different template.
51
+
52
+
If you *want* to change the value (say, you *do* want to migrate to a new template) just explicitly (re-)specify the option when running `init-windows`.
53
+
33
54
## Templates
34
55
35
-
The following templates are available for use with `init-windows` by replacing `--template XYZ`, where `XYZ` can be:
56
+
The following templates are available to `init-windows` and can by manually specified with the `--template` option (i.e. `--template cpp-lib`):
57
+
58
+
| Template | Name | Description |
59
+
|:-:|:--|:--|
60
+
|`cpp-app`| React Native Windows Application (New Arch, WinAppSDK, C++) | A RNW app using RN's New Architecture, built in C++ and targeting WinAppSDK |
61
+
|`cpp-lib`| React Native Windows Library (C++) | A RNW (Turbo) Native Module supporting RN's New and Old Architectures built in C++ |
62
+
|`old/uwp-cpp-app`| React Native Windows Application (Old Arch, UWP, C++) | A RNW app using RN's Old Architecture, built in C++ and targeting UWP |
63
+
|`old/uwp-cs-app`| React Native Windows Application (Old Arch, UWP, C#) | A RNW app using RN's Old Architecture, built in C# and targeting UWP |
36
64
37
-
| Template | Name |
38
-
|:-:|:--|
39
-
|`cpp-app`| React Native Windows Application (New Arch, WinAppSDK, C++) |
40
-
|`cpp-lib`| React Native Windows Library (C++) |
41
-
|`old/uwp-cpp-app`| React Native Windows Application (Old Arch, UWP, C++) |
42
-
|`old/uwp-cs-app`| React Native Windows Application (Old Arch, UWP, C#) |
65
+
> **Architecture Note:** When initializing React Native for Windows for the first time, the `init-windows` CLI command defaults to the `old/uwp-cpp-app` template, which targets React Native's Old Architecture. For more information, see [New vs. Old Architecture](new-architecture.md).
0 commit comments