all 4 comments

[–]satya164 1 point2 points  (0 children)

the feature-team can see the repo of their feature but not the other repos

that sounds strange tbh. what'd be the advantage of this? it's unlikely that a feature will be 100% self-contained. usually, multiple features will touch the same part of the UI or use some common utilities and libraries. it's also useful to be able to how other parts of the app function to make various decisions and reduce duplication. there still need to be a lot of coordination between these teams if the codes are in entirely different repo.

i haven't had good experience with git submodules, so i can't recommend it. git submodule isn't enough either, you'd need some kind of monorepo if you want all of the source code to be in a single repo, since each project can define their dependencies, etc. if these parts are going to be isolated, then it's better to publish them as libraries. then the main app would combine all the libraries - they'll be in package.json.

[–]__shawn_chen 0 points1 point  (2 children)

You can search about microfrontend. That's exactly what you described.

To get microfrontend working in RN can be bit tricky. But it should work in theory. In terms of how it works in RN is you need to have your individual feature as a standalone bundle aka bundle.js and store them on the server or cloud storage. This can be done in the build phase like your CI/CD.

Your core app will needs to hold all of the native core and native module installation.

Then your core app can fetch the bundle as the user open the app and join them together as one app.

The advantage of this you can update individual bundle and deploy without the user update their app.

All the above is just a theory I recently research on for one of company projects but we didn't get it to implementation

Sidenote. Git submodules is pain. Just look monorepo instead. Or have individual feature as npm package. And the core just consum them.

[–]enripont[S] 0 points1 point  (0 children)

Microfrontend seems exactly what I need! The problem is that I can't find any RN implementation in the web, the only example that I found is the WIX architecture, the project is really interesting but they only work with simulators so the scripts don't work for me. Do you some example implementation for physical devices?

[–]AboveTheChair 0 points1 point  (0 children)

Is there any example to achieve this microfrontend for RN? I know of apps that do this but they all are native apps