Live data from Hacker News

Precedent – Building Blocks for Next.js

precedent.vercel.app

21–30 of 50 posts

Re: Precedent – Building Blocks for Next.js

#21

Looking to learn and build a react app, should I start with this? Did review some html css prior.

If you want to learn, my advice would be to focus on learning one thing at a time. Pick up react. Just react. NextJS (and other libraries included here) solve specific problems in specific ways. It's hard to know if they solve them in the way that works for you if you don't understand the problem they are solving, or what other approaches might look like. Once you're comfortable with how react works, then start layer…

Totally disagree. Trying to fully understand a stack this tall from the get-go would be a huge barrier

One of the best things about Next is that it configures everything for you and lets you just start writing some React code and seeing results. I would recommend the GP start with Next, and dig deeper as they go along

Re: Precedent – Building Blocks for Next.js

#22
2/3 of these components are broken on iOS safari. I also see some questionable things happening in the hooks that might not make it past a review.

It's a good start, but definitely keep it up.

[1] — https://github.com/steven-tey/precedent/blob/main/lib/hooks/... (you don't need the ref if you are ignoring exhaustive-deps, not sure why you stringify threshold)

[2] - https://github.com/steven-tey/precedent/blob/main/lib/hooks/... (you maybe want to check if a key exists and warn before you set it)

[3] - https://github.com/steven-tey/precedent/blob/main/lib/hooks/... (you probably want debounce/throttle options here)

Re: Precedent – Building Blocks for Next.js

#23
post #7

Looking to learn and build a react app, should I start with this? Did review some html css prior.

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.

Re: Precedent – Building Blocks for Next.js

#24

Earlier quoted context omitted.

If you want to learn, my advice would be to focus on learning one thing at a time. Pick up react. Just react. NextJS (and other libraries included here) solve specific problems in specific ways. It's hard to know if they solve them in the way that works for you if you don't understand the problem they are solving, or what other approaches might look like. Once you're comfortable with how react works, then start layer…

Totally disagree. Trying to fully understand a stack this tall from the get-go would be a huge barrier One of the best things about Next is that it configures everything for you and lets you just start writing some React code and seeing results. I would recommend the GP start with Next, and dig deeper as they go along

Agreed. React by itself is mostly unusable for building anything – although that is slowly changing but alas: NextJS gives you a more solid starting point to build stuff around React.

Precedent seems a little half-hearted at this point.

Re: Precedent – Building Blocks for Next.js

#26

Looking to learn and build a react app, should I start with this? Did review some html css prior.

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)

Re: Precedent – Building Blocks for Next.js

#27
post #6
post #4

Only 3 components?

I think they're just bundling Radix UI: https://www.radix-ui.com/

Hey! OP here – this is not meant to be a design / component system, though I plan to add more components to it in the future if it makes sense. Rather, it's meant to be a powerful hello-world template that you can clone when you start a new Next.js project.

Highly recommend Radix if you want more components!

Re: Precedent – Building Blocks for Next.js

#28
post #14

This seems kinda weird. Random UI components, ORM, and string formatting utilities(???) all part of the same “thing”? I don’t get what this is, seems like a mishmash.

Hey! OP here – this is meant to be a powerful hello-world template that you can clone when you start a new Next.js project, something that I built for myself because I start way too many side projects haha

Re: Precedent – Building Blocks for Next.js

#30

I think this is pretty neat, my only feedback is that I'd like to see documentation on how to incorporate with an existing or new Next.js project.

Thanks! It's not meant to be integrated with an existing project, though you can copy some of the components over if you'd like!

To use it to bootstrap a new project, you can run:

``` npx create-next-app precedent --example "https://github.com/steven-tey/precedent" ```

Post reply on HN