callstack / super-app-showcase

Monorepository template for super app development with React Native and Re.Pack
MIT License
382 stars 63 forks source link

feat: add auth remote container #17

Closed andrewworld closed 1 year ago

andrewworld commented 1 year ago

Summary

Added auth remote container with shared auth logic and components. Now it contains AccountScreen which exposed and used across host, booking, shopping and dashboard apps. Since host app can't use remotes in Webpack config, addResolver should be configured in all applications that could work as standalone (working as standalone means that it is host app). Auth remote container does not have any native code or ios/android folders. All the native libraries should be installed in the host apps and should be shared in Webpack config to work properly.

Test plan

  1. Open any app from the repo
  2. Open Account screen

To-Do

  1. Generate bundle for auth remote container to work with news mini app in remote repository https://github.com/callstack-internal/news-mini-app-template
  2. Add AuthNavigator, expose it and use across the apps
thymikee commented 1 year ago

needs rebase. is this ready for review now?

andrewworld commented 1 year ago

needs rebase. is this ready for review now?

Resolved conflicts, ready for review

andrewworld commented 1 year ago

Looks good. Can you add README.md inside auth module to explain what it does, why its using this kind of pattern to avoid using hooks and what are the trade-offs?

Sure, I'll add README.md to every module with extended description in another PR