---
title: "Discussion on \"Sharing a custom common library to NextJS and React Apps, using Typescript with Yarn workspaces\" | Hashnode"
description: "Discussion on \"Sharing a custom common library to NextJS and React Apps, using Typescript with Yarn workspaces\". This approach has served Google well for more than 16 years, and today the vast majority of Google's software assets continue to be stored in a single, shared repository.\n See Figure 1. \n\nThis blog post will be part of another series. 🚀 \nLet's be ho..."
url: "https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Sharing a custom common library to NextJS and React Apps, using Typescript with Yarn workspaces](https://alecode.hashnode.dev/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces?utm_source=hashnode&utm_medium=feed)

This approach has served Google well for more than 16 years, and today the vast majority of Google's software assets continue to be stored in a single, shared repository. See Figure 1. This blog post will be part of another series. 🚀 Let's be ho...

Feb 17, 2021 · 11 min read · alecode.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#yarn](https://hashnode.com/tag/yarn)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#nextjs](https://hashnode.com/tag/nextjs)

## Written by

[Alejandro Soto](https://hashnode.com/@asotog)

@asotog

  
[View profile](https://hashnode.com/@asotog)

Developer

I am a developer from Costa Rica, who likes hamburguers, listens music, father of 2...

## Responses 5

Markdown supported · ⌘↵ to post

[Denial Brown](https://hashnode.com/@Denial701)

[Jul 26, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/60fe83effa408f0c89bd25af)

How is your performance after connecting Yarn? Our company is now thinking about such solutions, and I read this review - [https://waverleysoftware.com/blog/yarn-vs-npm/](https://waverleysoftware.com/blog/yarn-vs-npm/) which talks about the many advantages of Yarn when compared to NPM to make deploying projects more comfortable

[Alejandro Soto](https://hashnode.com/@asotog)

[Jul 26, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/60fe83effa408f0c89bd25af#reply-60ff32d9fa408f0c89bd3b2b)

Hi [Denial Brown](https://hashnode.com/@Denial701), for your question, with NPM 5+, the gap has decreased between both tools, in terms of speed and workspaces, but still yarn is known for parallel deps installations which makes it faster

[Ran Yehushua](https://hashnode.com/@Yehoosh)

[Feb 18, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/602eb20c1591c5239ebdbcbc)

Awesome write up Ale! Makes me appreciate the simplicity that Nx provides even more :-D

[Alejandro Soto](https://hashnode.com/@asotog)

[Feb 18, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/602eb20c1591c5239ebdbcbc#reply-602eb2681591c5239ebdbcc3)

Thanks man, feel the same 😉

[Corine Jiménez](https://hashnode.com/@Sjimenez)

[Feb 17, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/602d9550de5647175427f001)

Excelent way to explain it. Thanks

[Manuel Chaves Bodán](https://hashnode.com/@mchavesb)

[Feb 17, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/602d8076de5647175427eea1)

Easy to follow, well explained!!

Thanks [Alejandro Soto](https://hashnode.com/@asotog)

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Feb 17, 2021](https://hashnode.com/posts/sharing-a-custom-common-library-to-nextjs-and-react-apps-using-typescript-with-yarn-workspaces/602c8d994bb9c4083f0283ac/comment/602cb38e2d9e060f1cee67b3)

Just in time, as I play with Next.js! Nice one, thank you!
