Live data from Hacker News

Precedent – Building Blocks for Next.js

precedent.vercel.app

41–50 of 50 posts

Re: Precedent – Building Blocks for Next.js

#42
post #41

I already don't wanna use it when I see api like 'useLocalStorage', when does this end the spreading of this garbage hook thing? What does local storage have anything to do with render cycle?

It's pretty simple, conceptually. It's like useState but saves state in localStorage. It has exactly the same stuff to do with the render cycle as useState.

Re: Precedent – Building Blocks for Next.js

#44

Earlier quoted context omitted.

I highly recommend learning Next.js as a way to learn React – it is built on top of React and focuses on some of the most important hooks (useState, useEffect) while also giving you functions for server-side rendering that help make sure your app is performant from the get-go. That's actually how I learned React myself :) Disclaimer: I work at Vercel (we maintain Next.js)

Any courses you suggest? Was looking at frontend masters Also tailwindui or mui or ant?

MUI is fine but I wouldn't use it until you have some experience.

Re: Precedent – Building Blocks for Next.js

#45
post #41

I already don't wanna use it when I see api like 'useLocalStorage', when does this end the spreading of this garbage hook thing? What does local storage have anything to do with render cycle?

It's pretty simple, conceptually. It's like useState but saves state in localStorage. It has exactly the same stuff to do with the render cycle as useState.

no? You wanna duplicate local storage as a state in memory, and doing that you create some unnecessary hook that does the read write assuming re-renders. So now your codebase will have 2 different ways of doing localStorage, the normal, predictable way, when re-rendering isn't needed and the hook way.

Re: Precedent – Building Blocks for Next.js

#46
post #7

Earlier quoted context omitted.

Ant Design is phenomenal, mature, and fully featured. I highly recommend it instead of this.

and if this matters at all, the documentation is not that great, IMO. It suffers from some translation issues and isn't always very clear. I also audited their code quite a few times, and they do some very bizarre things in the name of "performance" under the hood.

I've never had issues with the docs.

The under-the-hood stuff also has never bitten me and that's exactly what I want an isolated, composable component to do for me anyway. Performance is excellent.

Re: Precedent – Building Blocks for Next.js

#47
post #18

Earlier quoted context omitted.

But it's very hard to not look like Ant. Some of the components are great though. Chakra is easy to design with, and fully accessible. Well thought out.

> But it's very hard to not look like Ant. I don't know why this matters. Users certainly don't notice or care. Worrying about it early in the development cycle is a waste of time. They also have general theming to allow you to quickly get it to look like your brand's colors: https://ant.design/docs/react/customize-theme

Users may or may not care, but Product Managers and designers definitely do.

FWIW I added css that overrode ant's. It was the simplest and easiest way. It was a step progress component

Re: Precedent – Building Blocks for Next.js

#48

Looks cool but im always discouraged by any UI kit that isn't optimized for mobile devices in their demo elements on the front page. Might wanna check the experience on iOS safari ;)

The z-index issues with the components have been fixed: https://github.com/steven-tey/precedent/issues/2

Sorry about that!

Re: Precedent – Building Blocks for Next.js

#49
post #45

Earlier quoted context omitted.

It's pretty simple, conceptually. It's like useState but saves state in localStorage. It has exactly the same stuff to do with the render cycle as useState.

no? You wanna duplicate local storage as a state in memory, and doing that you create some unnecessary hook that does the read write assuming re-renders. So now your codebase will have 2 different ways of doing localStorage, the normal, predictable way, when re-rendering isn't needed and the hook way.

Ok

Re: Precedent – Building Blocks for Next.js

#50

I love Vercels design, I remember reading on their discussion page that they were working on open-sourcing their components and design system, but that was about two years ago? Now the closest thing we have is geist-ui.dev

https://vercel.com/design/introduction They hired evilrabbit and now show geist ui on their own site.

That's so cool, I didn't know they updated that page as well. But it still says their components are internal, which is sad.

Is geist-ui 1-to-1 copy of Vercels?

Post reply on HN