TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Precedent – Building Blocks for Next.js

53 pointsby steventeyover 2 years ago

15 comments

AirMax98over 2 years ago
2&#x2F;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.<p>It&#x27;s a good start, but definitely keep it up.<p>[1] — <a href="https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;lib&#x2F;hooks&#x2F;use-intersection-observer.ts#L38">https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;lib&#x2F;hooks&#x2F;...</a> (you don&#x27;t need the ref if you are ignoring exhaustive-deps, not sure why you stringify threshold)<p>[2] - <a href="https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;lib&#x2F;hooks&#x2F;use-local-storage.ts#L3">https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;lib&#x2F;hooks&#x2F;...</a> (you maybe want to check if a key exists and warn before you set it)<p>[3] - <a href="https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;lib&#x2F;hooks&#x2F;use-scroll.ts#L3">https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;lib&#x2F;hooks&#x2F;...</a> (you probably want debounce&#x2F;throttle options here)
评论 #34376248 未加载
评论 #34375403 未加载
puppycodesover 2 years ago
Looks cool but im always discouraged by any UI kit that isn&#x27;t optimized for mobile devices in their demo elements on the front page. Might wanna check the experience on iOS safari ;)
评论 #34381275 未加载
super256over 2 years ago
I&#x27;ve checked out the &lt;Modal &#x2F;&gt; component [1]. What&#x27;s the reason to go through so many hoops instead of just using the HTML native &lt;dialog&gt; element [2]?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;components&#x2F;shared&#x2F;modal.tsx">https:&#x2F;&#x2F;github.com&#x2F;steven-tey&#x2F;precedent&#x2F;blob&#x2F;main&#x2F;components...</a><p>[2] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTML&#x2F;Element&#x2F;dialog#examples" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;HTML&#x2F;Element&#x2F;di...</a>
评论 #34372178 未加载
评论 #34374391 未加载
solarkraftover 2 years ago
I&#x27;m waiting for the UI library that also animates everything out that it animates in. I know why people don&#x27;t do it (it&#x27;s annoying to do in React), but this gross lack of attention to detail in even the biggest-name software really bothers me. The UX sucks. If you&#x27;re not going to animate it out, just skip animating it in to at least be consistent!<p>This isn&#x27;t meant to be a dig at this specific library* (it&#x27;s certainly no worse than others and you probably did a great job!), but rather the general state of React UI development.<p>*however this library already uses Framer Motion, which makes such things much easier
ndstephensover 2 years ago
Curious why you went with RadixUI over HeadlessUI? Not that you shouldn&#x27;t, just wondering what your decision process was.<p>I also noticed in `_app.tsx` that you wrapped &lt;Component &#x2F;&gt; in a &lt;main&gt; element. Wouldn&#x27;t that wrap the entire app within main tags? I think that kind of throws off the normal flow of accessible landmarks.<p>I really like the template so far. Might add a few aspects of it to my own. Thanks for sharing
评论 #34376653 未加载
rajangdavisover 2 years ago
I think this is pretty neat, my only feedback is that I&#x27;d like to see documentation on how to incorporate with an existing or new Next.js project.
评论 #34374823 未加载
thrownblownover 2 years ago
Popover drop-down is broken in mobile chrome on Android unless I request the desktop site.
评论 #34376656 未加载
reducesufferingover 2 years ago
Since this is for your and other peoples&#x27; new projects, I&#x27;d rather recommend you use the app&#x2F; in Next 13 rather than pages. I&#x27;m told Vercel themselves are doing most new things in app&#x2F;
nsonhaover 2 years ago
I already don&#x27;t wanna use it when I see api like &#x27;useLocalStorage&#x27;, when does this end the spreading of this garbage hook thing? What does local storage have anything to do with render cycle?
评论 #34377915 未加载
Alifatiskover 2 years ago
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?<p>Now the closest thing we have is geist-ui.dev
评论 #34375530 未加载
bottlepalmover 2 years ago
I’m already using most of this stack except for Radix, anyone know how it compares to MUI?<p>Surprised they didn’t include a query library. I like the idea of tRPC, but would like to use it on any REST style url.
brapover 2 years ago
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.
评论 #34374809 未加载
yawnxyzover 2 years ago
Is that number in the green circle just counting down way into the negative numbers for anyone else?
评论 #34374811 未加载
moneywoesover 2 years ago
Looking to learn and build a react app, should I start with this?<p>Did review some html css prior.
评论 #34372831 未加载
评论 #34374762 未加载
评论 #34372052 未加载
ushakovover 2 years ago
Only 3 components?
评论 #34371720 未加载