![]() Super apps are multipurpose platforms that integrate a wide range of services and features to answer diverse user needs, all within a single mobile interface. Projects need to be divided into separate folders and we should have root level package.json. In order to set up yarn workspaces, we need to restructure our project to suit the structure below. Downloading packages multiple times can lead to longer CI/CD runs and higher costs. When nohoist option is turned on, most of the time packages are duplicated inside the root level node_modules and inside the project level node_modules. Preventing packages from hoisting takes back the main advantage of monorepos which is sharing node_modules between repositories. It depends on your use case but most of the time it’s better to hoist packages to the root level.Īlternatively, you can use npm workspaces, it should work the same. Yarn workspaces have an option named nohoist which allows us to specify packages that aren’t hoisted. While setting up a monorepo, we have two options: we can either hoist the packages to the root level or prevent them from hoisting. Most of the time we decide to share only business logic, but thanks to React Native Web, we can also share some of the UI components. The main advantage though is the possibility of sharing packages between React and React Native. This means easier dependency management, shorter CI times, and better collaboration between teams since the code can be shared. ![]() Thanks to react-native-web we can share every component so there’s no need to duplicate the code many times. In this article, we’re going to set up a basic structure for a monorepo in React Native. Monorepos enable sharing the logic between a web app and a mobile app, for example. Working with monorepos is very useful, especially when developing big and complex applications like super apps. ![]() While the projects can be related, they can be used independently by different teams. A monorepo is a single repository that holds a multitude of projects with all their code and assets. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |