This video is available to students only

When creating any shared asset the technologies that you choose will affect your consumers. This is especially true with front-end shared assets, including component libraries.

In this course we will be choosing dependencies that allow our component library to be used in a wide variety of React codebases.

Types of dependencies#

NPM packages have three types of dependencies:

  • dependencies

    • Packages required by your application in production

    • These are installed with your package

  • devDependencies

    • Packages that are only needed for local development and testing

    • When your component library is installed, these packages are not included

  • peerDependencies

    • Packages that consuming codebases are required to install

    • Useful for dependencies that require a single instance, i.e. react and react-dom

Component styling and styled-components#

Start a new discussion. All notification go to the author.