Skip to content

Commit

Permalink
feat: add updated bare and expo rn guides (#1303)
Browse files Browse the repository at this point in the history
* feat: add updated bare and expo rn guides

* feat: update bare info callout to default to expo

* fix: fix docs linting

* fix: fix typo
  • Loading branch information
iykazrji authored Jan 28, 2025
1 parent 88aeb63 commit a129185
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,12 @@ module.exports = config;

#### Register global shims

Import the following packages at the top of your `App.tsx` file so that libraries that depend on globals like `crypto` have access to them.
Import the following packages at the topmost entry point of your app so that libraries that depend on globals like `crypto` have access to them.

:::tip
If you're using bare React Native, you would add the above imports to your `index.js` file.
:::
If you are using `expo-router`, add the imports in your topmost `_layout.tsx` file in the `app` directory. However if you are using a different navigation library (e.g. `react-navigation`),
add the imports in your topmost `App.tsx` file.

```tsx [App.tsx]
```tsx [App.tsx or app/_layout.tsx]
import "node-libs-react-native/globals.js";
import "react-native-get-random-values";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: A guide on integrating Account Kit within a Bare React Native appli
To use Account Kit in your React Native application, ensure you are on React Native version 0.76 or higher.
:::

:::info
This guide assumes you already have a Bare React Native app and want to integrate Account Kit. If you are starting a project from scratch, we recommend following the [Expo guide](/react-native/getting-started/getting-started-expo) instead.
:::

## Getting Started on a Bare React Native project

We would go through the steps to get your environment setup for using Account Kit within a Bare React Native application.
Expand Down
7 changes: 4 additions & 3 deletions site/pages/react-native/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import { TileButton } from "../../components/TileButton";

# Using within React Native applications

We've built a simple example using expo [here](https://github.com/alchemyplatform/aa-sdk/tree/main/examples/react-native-expo-example). This guide assumes you're using Expo, but the same principles should apply to a bare React Native app as well.
We've built a simple example for reference purposes [here](https://github.com/alchemyplatform/aa-sdk/tree/main/examples/react-native-expo-example). This was built using Expo, but the same principles should apply to a bare React Native app as well.

## Getting Started

:::tip
If you're starting fresh, we recommend using Expo as it makes getting started significantly easier.
:::info
If you are starting a fresh project, we highly recommend using Expo. You can easily create a new Expo project by running `npx create-expo-app@latest` from your terminal.
Visit the [Expo docs](https://docs.expo.dev/get-started/create-a-project/) for more information.
:::

Whether you're using Expo or a bare React Native app, follow our guides to get started with using Account Kit in your project.
Expand Down
4 changes: 4 additions & 0 deletions site/sidebar/reference/account-kit/react.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a129185

Please sign in to comment.