Intro

When working with React, there comes a time when you want to reuse your components on different pages or for different projects. At first, everything seems fine. But after a while, you’ll need to change a prop or make a breaking change in one component but you don’t want/can’t go to every project and fix all the references in a timely manner.

That’s when you start to look for solutions to this problem and you discover the magical word—“Monorepo”. In this post, I am going to review some concepts and use cases you need to know when adopting a monorepo strategy for your shared UI components library using React as the UI library and Lerna as our monorepo orchestrator.