-
Notifications
You must be signed in to change notification settings - Fork 63
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
refactor: Use react-native-test-app to manage our test app #142
refactor: Use react-native-test-app to manage our test app #142
Conversation
Since I couldn't add you as reviewers.. Alas, I couldn't add macOS support because |
@Naturalclar This should be ready for review! It should also make updating to RN 0.65 very simple, I just didn't want to bundle that in the same review. Thanks @tido64 for helping fix upstream CLI issues! |
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.
@Saadnajmi @tido64 awesome! thank you guys so much!
Btw, the first 0.64 versions of |
Yep! I have a working menu component I wrote for macOS elsewhere that I can port here once I get the chance! |
Overview
This PR replaces the test app in the repo with one managed by React Native Test App. This is mainly inspired by my want to add macOS support, which is currently blocked by / tracked at #141. Still, setting up the template test app now will make standing up the macOS portion of the test app trivial come time.
"React Native Test App" provides test apps for all platforms as a package. It handles the native bits, allowing you the developer to focus on the JS. There are a few advantages to using this package:
Steps
I tried to document my steps well with my individual commit messages. In essence:
After this I did a few extra things:
yarn / pod install
in the new example test app foldercd example && yarn && pod install --project-directory:ios
git add yarn.lock ios/Podfile.lock
yarn lint --fix
to fix lint errors in the generated test app (mostly double quotes vs single quotes)package.json
to include the following dependency so we can actually test menu:"@react-native-menu/menu": "../"
Then finally, I copied over the JS source from the old test app, and deleted the old test app
Test Plan
Locally ran the iOS and Android test apps.