Skip to content

Commit 51a4e91

Browse files
docs: clarify resource fetcher install steps and peer deps (#1146)
## Description Rewords the per-fetcher comments in the Getting Started installation block to make it explicit which fetcher to install for Expo vs bare React Native, and lists the required peer packages (`expo-file-system`/`expo-asset` for Expo; `@dr.pogodin/react-native-fs`/`@kesha-antonov/react-native-background-downloader` for bare RN) so the docs align with the README. Also fixes the stale `// or BareResourceFetcher for Expo projects` comment. Applied to both the current docs and the `version-0.8.x` versioned docs. Supersedes #1145. ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [ ] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [x] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions N/A — documentation-only change. ### Screenshots ### Related issues Supersedes #1145. ### Checklist - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes Co-authored-by: I-am-Pritam-20 <177415206+I-am-Pritam-20@users.noreply.github.com>
1 parent c0e3a83 commit 51a4e91

2 files changed

Lines changed: 26 additions & 14 deletions

File tree

docs/docs/01-fundamentals/01-getting-started.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,38 @@ Installation is pretty straightforward, use your package manager of choice to in
4545

4646
```bash
4747
npm install react-native-executorch
48-
# For Expo projects
48+
# For Expo projects, you need to install expo resource fetcher
4949
npm install react-native-executorch-expo-resource-fetcher
50-
# For bare React Native projects
50+
npm install expo-file-system expo-asset
51+
# For bare React Native projects, you need to install bare resource fetcher
5152
npm install react-native-executorch-bare-resource-fetcher
53+
npm install @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
5254
```
5355

5456
</TabItem>
5557
<TabItem value="pnpm" label="PNPM">
5658

5759
```bash
5860
pnpm install react-native-executorch
59-
# For Expo projects
61+
# For Expo projects, you need to install expo resource fetcher
6062
pnpm install react-native-executorch-expo-resource-fetcher
61-
# For bare React Native projects
63+
pnpm install expo-file-system expo-asset
64+
# For bare React Native projects, you need to install bare resource fetcher
6265
pnpm install react-native-executorch-bare-resource-fetcher
66+
pnpm install @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
6367
```
6468

6569
</TabItem>
6670
<TabItem value="yarn" label="YARN">
6771

6872
```bash
6973
yarn add react-native-executorch
70-
# For Expo projects
74+
# For Expo projects, you need to install expo resource fetcher
7175
yarn add react-native-executorch-expo-resource-fetcher
72-
# For bare React Native projects
76+
yarn add expo-file-system expo-asset
77+
# For bare React Native projects, you need to install bare resource fetcher
7378
yarn add react-native-executorch-bare-resource-fetcher
79+
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
7480
```
7581

7682
</TabItem>
@@ -82,7 +88,7 @@ Before using any other API, you must call `initExecutorch` with a resource fetch
8288
```js
8389
import { initExecutorch } from 'react-native-executorch';
8490
import { ExpoResourceFetcher } from 'react-native-executorch-expo-resource-fetcher';
85-
// or BareResourceFetcher for Expo projects
91+
// or BareResourceFetcher for bare react-native projects
8692

8793
initExecutorch({ resourceFetcher: ExpoResourceFetcher });
8894
```

docs/versioned_docs/version-0.8.x/01-fundamentals/01-getting-started.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,38 @@ Installation is pretty straightforward, use your package manager of choice to in
4545

4646
```bash
4747
npm install react-native-executorch
48-
# For Expo projects
48+
# For Expo projects, you need to install expo resource fetcher
4949
npm install react-native-executorch-expo-resource-fetcher
50-
# For bare React Native projects
50+
npm install expo-file-system expo-asset
51+
# For bare React Native projects, you need to install bare resource fetcher
5152
npm install react-native-executorch-bare-resource-fetcher
53+
npm install @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
5254
```
5355

5456
</TabItem>
5557
<TabItem value="pnpm" label="PNPM">
5658

5759
```bash
5860
pnpm install react-native-executorch
59-
# For Expo projects
61+
# For Expo projects, you need to install expo resource fetcher
6062
pnpm install react-native-executorch-expo-resource-fetcher
61-
# For bare React Native projects
63+
pnpm install expo-file-system expo-asset
64+
# For bare React Native projects, you need to install bare resource fetcher
6265
pnpm install react-native-executorch-bare-resource-fetcher
66+
pnpm install @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
6367
```
6468

6569
</TabItem>
6670
<TabItem value="yarn" label="YARN">
6771

6872
```bash
6973
yarn add react-native-executorch
70-
# For Expo projects
74+
# For Expo projects, you need to install expo resource fetcher
7175
yarn add react-native-executorch-expo-resource-fetcher
72-
# For bare React Native projects
76+
yarn add expo-file-system expo-asset
77+
# For bare React Native projects, you need to install bare resource fetcher
7378
yarn add react-native-executorch-bare-resource-fetcher
79+
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
7480
```
7581

7682
</TabItem>
@@ -82,7 +88,7 @@ Before using any other API, you must call `initExecutorch` with a resource fetch
8288
```js
8389
import { initExecutorch } from 'react-native-executorch';
8490
import { ExpoResourceFetcher } from 'react-native-executorch-expo-resource-fetcher';
85-
// or BareResourceFetcher for Expo projects
91+
// or BareResourceFetcher for bare react-native projects
8692

8793
initExecutorch({ resourceFetcher: ExpoResourceFetcher });
8894
```

0 commit comments

Comments
 (0)