Skip to content

Commit 8568958

Browse files
shwantonShawn Dempsey
and
Shawn Dempsey
authored
Fix fabric native component example (#3642)
* Fix custom Fabric Native component import example * Add instructions on updating local npm package --------- Co-authored-by: Shawn Dempsey <[email protected]>
1 parent 0546988 commit 8568958

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

docs/the-new-architecture/pillars-fabric-components.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,13 @@ yarn add ../RTNCenteredText
903903

904904
This command adds the `RTNCenteredText` Component to the `node_modules` of your app.
905905

906+
If the package was previously added to your app, you will need to update it:
907+
908+
```sh
909+
cd MyApp
910+
yarn upgrade rtn-centered-text
911+
```
912+
906913
### iOS
907914

908915
Then, you need to install the new dependencies in your iOS project. To do so, you need to run these commands:
@@ -942,7 +949,7 @@ Finally, you can use the component in your JavaScript application.
942949
*/
943950
import React from 'react';
944951
import type {Node} from 'react';
945-
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
952+
import RTNCenteredText from 'rtn-centered-text/js/RTNCenteredTextNativeComponent';
946953

947954
const App: () => Node = () => {
948955
return (
@@ -966,7 +973,7 @@ export default App;
966973
* @format
967974
*/
968975
import React from 'react';
969-
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
976+
import RTNCenteredText from 'rtn-centered-text/js/RTNCenteredTextNativeComponent';
970977

971978
const App: () => JSX.Element = () => {
972979
return (

website/versioned_docs/version-0.70/the-new-architecture/pillars-fabric-components.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,13 @@ yarn add ../RTNCenteredText
804804

805805
This command adds the `RTNCenteredText` Component to the `node_modules` of your app.
806806

807+
If the package was previously added to your app, you will need to update it:
808+
809+
```sh
810+
cd MyApp
811+
yarn upgrade rtn-centered-text
812+
```
813+
807814
### iOS
808815

809816
Then, you need to install the new dependencies in your iOS project. To do so, you need to run these commands:
@@ -843,7 +850,7 @@ Finally, you can use the component in your JavaScript application.
843850
*/
844851
import React from 'react';
845852
import type {Node} from 'react';
846-
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
853+
import RTNCenteredText from 'rtn-centered-text/js/RTNCenteredTextNativeComponent';
847854

848855
const App: () => Node = () => {
849856
return (
@@ -867,7 +874,7 @@ export default App;
867874
* @format
868875
*/
869876
import React from 'react';
870-
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
877+
import RTNCenteredText from 'rtn-centered-text/js/RTNCenteredTextNativeComponent';
871878

872879
const App: () => JSX.Element = () => {
873880
return (

website/versioned_docs/version-0.71/the-new-architecture/pillars-fabric-components.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,13 @@ yarn add ../RTNCenteredText
903903

904904
This command adds the `RTNCenteredText` Component to the `node_modules` of your app.
905905

906+
If the package was previously added to your app, you will need to update it:
907+
908+
```sh
909+
cd MyApp
910+
yarn upgrade rtn-centered-text
911+
```
912+
906913
### iOS
907914

908915
Then, you need to install the new dependencies in your iOS project. To do so, you need to run these commands:
@@ -942,7 +949,7 @@ Finally, you can use the component in your JavaScript application.
942949
*/
943950
import React from 'react';
944951
import type {Node} from 'react';
945-
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
952+
import RTNCenteredText from 'rtn-centered-text/js/RTNCenteredTextNativeComponent';
946953

947954
const App: () => Node = () => {
948955
return (
@@ -966,7 +973,7 @@ export default App;
966973
* @format
967974
*/
968975
import React from 'react';
969-
import RTNCalculator from 'rtn-calculator/js/NativeCalculator';
976+
import RTNCenteredText from 'rtn-centered-text/js/RTNCenteredTextNativeComponent';
970977

971978
const App: () => JSX.Element = () => {
972979
return (

0 commit comments

Comments
 (0)