discussions-and-proposals
discussions-and-proposals copied to clipboard
Documentation / Recommended way for handling code sharing and monorepo structures
Introduction
Metro doesn't yet support Symlinks, making it difficult to use shared code repository structures across multiple apps/platforms using a single codebase (monorepo).
It was one of the top voted issues in the "What do you dislike about React Native?" June 2019 Edition.

While this is a technical issue for Metro, it's causing a painful Developer Experience issue for many React Native developers.
Details
In the React Native Open Source Update June 2019 blog post, @cpojer shared that support for this wouldn't be provided from Facebook:
Unfortunately we haven't been able to implement a simple and straightforward solution for this yet. However, React Native users shared various workarounds that may work for you.
These workarounds include npm packages and changes to the metro configuration, some of which date back to 2017.
Discussion points
- Is anyone able to provide an update on this?
- I've noticed that Facebook is keen to accept contributions to the awesome new docs, is a recommended workaround something that could be documented? (Similar to how Ignite CLI is recommended on the Platforms to Try docs)
- If there is a recommended workaround, perhaps it could be integrated into the React Native CLI?
Just to add my few cents, I made a repo for yarn 2 + RN / expo: https://github.com/jsamr/yarnberry-expo-quickstarter (despite its name, the steps are identical for expo and vanilla RN projects).
nx.dev react-native seems to solve this problem.
peeps should just start using/migrating to nx