Create a Shared React Library in an Nx Workspace

Share this video with your friends

Send Tweet

Nx is designed to best work with large monorepos. As such it aims to help you scale your development across teams and applications. One of the guiding principles is to split your code into apps and libs. Most of your code lives inside dedicated, well bounded libs, whereas apps can be seen as the "linkers" that include the various libraries into a deployable and cohesive unit. In this lesson we're going to learn how to create a new React library within our Nx workspace, how to generate a component into that library and then re-use it within our store application.