callstack / super-app-showcase

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

Hot reloading doesn't work in mini app #22

Closed ArekChr closed 1 year ago

ArekChr commented 1 year ago

Description

While testing the app, I encountered an issue with hot reloading in mini app when the host server is started.

@andrewworld Do you know the reason for this limitation?

Reproducible Demo

  1. run yarn start:host
  2. navigate to services
  3. navigate to one of mini app
  4. make some changes to the selected mini app
jbroma commented 1 year ago

It's currently not possible to perform hot-module replacement of the mini-app embedded into the host-app. Two dev servers would need to communicate with each other and it's a very complex problem

chakravarthi-bb commented 1 year ago

if there is no HMR, what's the suggested way to just run mini apps??

jbroma commented 1 year ago

Hi @chakravarthi-bb

To mitigate the issue with HMR, you can run the dashboard mini-app in standalone mode. You can do that by running:

# starts dev-server for dashboard mini-app in standalone mode
yarn start:standalone:dashboard 

and then run

yarn run:dashboard:ios
# or
yarn run:dashboard:android

Only dashboard mini-app includes android & ios directories needed to run the app in standalone mode. You could add them to the rest of the mini-apps as well and have the same experience.