From ebecaa33fc5ff4e1d4a9b2b57bd332df477e5362 Mon Sep 17 00:00:00 2001 From: Aman Mittal Date: Sat, 28 Feb 2026 22:19:59 +0530 Subject: [PATCH] [docs] Update examples in Expo Modules API to use src/ for SDK 55 (#42816) # Why Follow-up https://github.com/expo/expo/pull/42796 # How - Updates file path references across guides and linking docs to reflect the SDK 55 default project structure where app/, components/, constants/, and hooks/ directories live inside src/. - Applies to Expo Modules API section only # Test Plan Verify all updated code block annotations render correctly on the docs site locally. # Checklist - [ ] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) ## Summary by CodeRabbit * **Documentation** * Updated code examples across multiple module guides to reflect the correct source directory paths, ensuring accurate import references in implementation instructions. --- docs/pages/modules/get-started.mdx | 4 ++-- docs/pages/modules/third-party-library.mdx | 4 ++-- .../use-standalone-expo-module-in-your-project.mdx | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/pages/modules/get-started.mdx b/docs/pages/modules/get-started.mdx index 9d4c33aa1f1eaa..393a4e7901508f 100644 --- a/docs/pages/modules/get-started.mdx +++ b/docs/pages/modules/get-started.mdx @@ -61,9 +61,9 @@ Then, if your project doesn't have native projects generated (**android** and ** ### Use the local module -Import the local module in your application, for example in **App.js** or **App.tsx** or **app/(tabs)/index.tsx**: +Import the local module in your application, for example in **App.js** or **App.tsx** or **src/app/index.tsx**: -```tsx app/(tabs)/index.tsx +```tsx src/app/index.tsx /* @hide ...*/ /* @end */ import MyModule from '@/modules/my-module'; diff --git a/docs/pages/modules/third-party-library.mdx b/docs/pages/modules/third-party-library.mdx index 7899a6383e82c1..5ab88194c6634e 100644 --- a/docs/pages/modules/third-party-library.mdx +++ b/docs/pages/modules/third-party-library.mdx @@ -377,9 +377,9 @@ public class ExpoRadialChartModule: Module { ## Write an example app to use the module -You can update the app inside the **app** directory to test the module. Use the `ExpoRadialChartView` component to render a pie chart with three slices: +You can update the app inside the **src/app** directory to test the module. Use the `ExpoRadialChartView` component to render a pie chart with three slices: -```tsx app/(tabs)/index.tsx +```tsx src/app/index.tsx import { ExpoRadialChartView } from '@/modules/expo-radial-chart'; import { StyleSheet } from 'react-native'; diff --git a/docs/pages/modules/use-standalone-expo-module-in-your-project.mdx b/docs/pages/modules/use-standalone-expo-module-in-your-project.mdx index 5b1e82df8ac48f..6ffaa3496d5453 100644 --- a/docs/pages/modules/use-standalone-expo-module-in-your-project.mdx +++ b/docs/pages/modules/use-standalone-expo-module-in-your-project.mdx @@ -81,9 +81,9 @@ Compile and run the app with the following command: ]} /> -You can now use the module in your app. To test it, edit the **app/(tabs)/index.tsx** file in your app and render the text message from the `expo-settings` module: +You can now use the module in your app. To test it, edit the **src/app/index.tsx** file in your app and render the text message from the `expo-settings` module: -```tsx app/(tabs)/index.tsx +```tsx src/app/index.tsx import React from 'react'; import { Text, View } from 'react-native'; import * as Settings from 'expo-settings'; @@ -180,9 +180,9 @@ To test the published module in a new project, create a new app and install the ]} /> -You can now use the module in your app! To test it, edit **app/(tabs)/index.tsx** and render the text message from **expo-settings**. +You can now use the module in your app! To test it, edit **src/app/index.tsx** and render the text message from **expo-settings**. -```tsx app/(tabs)/index.tsx +```tsx src/app/index.tsx import React from 'react'; import * as Settings from 'expo-settings'; import { Text, View } from 'react-native';