From 4960ee99b98ba2feefc87e97c7553cb72c83c7bc Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Thu, 29 Jun 2023 01:58:37 -0700 Subject: [PATCH] docs: add usage showcase --- .../blog/setup-a-react-native-monorepo/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/content/blog/setup-a-react-native-monorepo/index.md b/content/blog/setup-a-react-native-monorepo/index.md index a155c5f7..a514658d 100644 --- a/content/blog/setup-a-react-native-monorepo/index.md +++ b/content/blog/setup-a-react-native-monorepo/index.md @@ -609,6 +609,23 @@ Now that we have our package setup in our monorepo, we need to tell Yarn to asso Now, re-run `yarn` at the root of the monorepo. This will link your dependencies together as if it were any other, but pulling from your local filesystem! +## Using the Package in Our App {#use-shared-in-app} + +Now that we have our package set up, let's use it in our app! + +```tsx +// App.tsx +import {HelloWorld} from "@your-org/shared-elements"; + +export const App = () => { + return +} +``` + +That's all! 🎉 + +But wait... We're hitting some kind of error when we run our app... I wonder if it's becaus... + ## Fixing issues with the Metro Bundler {#metro} Remember how React requires a single instance of React (and React deps) require exactly one single instance of itself in order to operate properly?