Developer-DAO / DAO-job-board

A job board connecting DAOs with talent.
https://devdao-job-board.vercel.app/
82 stars 34 forks source link

Setup a React library compatible to Next.js and Storybook #128

Closed carlomigueldy closed 2 years ago

carlomigueldy commented 2 years ago

Overview

The main purpose of setting up a library in this monorepo is to house all design system components. This allows highly reusability of React components across the monorepo and even better share this library to other D_D dApps. There has been some thoughts going around that it'd be great if we can start building the design system library from this repo and share what we built to emerging projects from RFCs. When we have this library in the monorepo we can use it in both Next.js project & Storybook. Or at least that's just my assumption of how it would work, please correct me if I am mistaken.

To Do

Would love to have your thoughts on this guys. cc @Dhaiwat10 @with-heart @angeljgomezc @JoviDeCroock

JoviDeCroock commented 2 years ago

Hey,

There's a lot of ways this can be set up. Because it's in the monorepo it benefits from prettier already.

You can create a package bundle with rollup and use it in the next app, this is symlinked by default in a monorepo. However this incurs an additional build step before hot reloads can kick in with next.

Prototyping a design system could also be done as part of the next app and be abstracted out later, that will be easier from a developer experience pov.

carlomigueldy commented 2 years ago

Prototyping a design system could also be done as part of the next app and be abstracted out later, that will be easier from a developer experience pov.

Ah I see. We'll go with that instead since there are additional steps if we go by setting up a library.

I think I will close this issue for now since most likely it's what everyone would say too at this stage. Thank you for your feedback on this @JoviDeCroock 🥂