Skip to content
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: move to expo #321

Merged
merged 1 commit into from
Apr 19, 2024
Merged

refactor: move to expo #321

merged 1 commit into from
Apr 19, 2024

Conversation

Harjot1Singh
Copy link
Member

@Harjot1Singh Harjot1Singh commented Apr 15, 2024

Summary

Yes... please excuse the size of this 😅

It's been a while since we've done significant work on this project. Since then, expo has become an excellent choice of tooling to reduce the overall maintenance burden. This PR fundamentally moves us over to expo, with a number of tooling changes that will simplify working with the project successfully.

Expo CNG

Continuous native generation means that we no longer have to maintain specific ios and android folders - these are generated on build with the appropriate config. Much more stable & deterministic across different setups.

Expo Router

Instead of setting up the screens and structure for defining screens ourselves, expo-router uses filesystem-based routing. Since the convention is public, it makes it much easier for everyone to know where and how to add new routes. It also comes with deeplinking OOTB. It's powered by react-navigation under-the-hood, which is what we were explicitly using beforehand.

Atomic Design

Organising component code has been made clearer by adopting Atomic Design. Components must fit into atoms, molecules, organisms, templates, and templates are always rendered by routes, to improve testability and reusability. We have not figured out a convention for layout routes just yet.

We should adopt this for our design library/system.

Logging

We're using a proper logger, with module-scoped messages O_o

Config

Env variables can be set in the config/environment/config.{environment}.ts files. Running the app with APP_ENV=next will inject the values in config.next.ts and so forth. TS files have been used to ensure we can catch missed declarations/fields.

By default, APP_ENV=local, so config.localts is used. This file is gitignored and so you should copy config.example.ts over as config.local.ts.

Mise/Simplified Tooling

We now recommend using mise to install the different versions of tools, in .ruby-version, .node-version, and .java-version. You can also use other tools separately, such as asdf, rvm, and nvm.

EAS build + submit

Now that we're using the eas-cli to build and submit (in local mode), there is no need for fastlane, homebrew (graphicsmagik), or ruby! Simplified tooling and reduced maintenance burden :)

@Harjot1Singh Harjot1Singh force-pushed the migrate-to-expo branch 9 times, most recently from a571c4d to 077f6c4 Compare April 19, 2024 02:19
@Harjot1Singh Harjot1Singh force-pushed the migrate-to-expo branch 2 times, most recently from 9e48014 to 2e71fac Compare April 19, 2024 18:29
@Harjot1Singh Harjot1Singh force-pushed the migrate-to-expo branch 3 times, most recently from 4e0aa62 to d5549df Compare April 19, 2024 19:51
@Harjot1Singh Harjot1Singh merged commit c82dfee into main Apr 19, 2024
7 checks passed
@Harjot1Singh Harjot1Singh deleted the migrate-to-expo branch April 19, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants