New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Update Adding a new module to an existing application section in Expo Modules API: Get started #28470
base: main
Are you sure you want to change the base?
Conversation
…in Expo Modules API: Get started
📘 Your docs preview website is ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you for improving it! I left a couple of comments.
I'm also wondering if recommending building/running the native project from Xcode and Android Studio wouldn't be better than npx expo run
and re-running it every time you change something.
User could just run npx expo start
once and then use the native editors which I believe offer a bit better DX for native code development. You don't need to switch between the editor and terminal, you have access to the native logs, debugger etc.
docs/pages/modules/get-started.mdx
Outdated
|
||
Rebuild the app or build a new development client and you should see your change. Remember you need to either run `npx expo prebuild` each time you make a native change or reinstall the pods using `pod install --project-directory="example/ios"` (which should be way faster). | ||
Remember you need to either run `npx expo prebuild` each time you make a native change or reinstall the pods using `pod install --project-directory="ios"` (which will be faster). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary to run prebuild
after each native change. You only need to run
it again.
pod install
might be necessary when you modify expo-module.config.json
(e.g. add another module class) and when you add more files to the module (they won't appear in Xcode if you add them using something else than Xcode).
docs/pages/modules/get-started.mdx
Outdated
|
||
Rebuild the app or build a new development client and you should see your change. | ||
For example, change the `hello` method to return a different string such as "Hello world! 🌎🤖". Then, run `npx expo prebuild` to generate the native directory and use `npx expo:android` to run the example app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, change the `hello` method to return a different string such as "Hello world! 🌎🤖". Then, run `npx expo prebuild` to generate the native directory and use `npx expo:android` to run the example app. | |
For example, change the `hello` method to return a different string such as "Hello world! 🌎🤖". Then, run `npx expo prebuild` to generate the native directory and use `npx expo:android` to run the example app. |
It's not necessary to run
prebuild
after each native change. You only need torun
it again.
@tsapeta, does the comment mean, we don't need to run npx expo prebuild
at this step too? (similarly for iOS below).
Why
Context Slack
How
npx expo run
commands to compile and run the example app instead of using EAS Build.Test Plan
Run docs locally and see: http://localhost:3002/modules/get-started/#adding-a-new-module-to-an-existing-application or see Preview link below.
Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).