HNHacker News
TopNewBestAskShowJobs

zoontek

11 karma · joined July 7, 2016

submissionscomments
zoontek··on Merging Remix and React Router
Stars don't mean usage.

Remix has 21,375 downloads per week according to npm. Next has 6,562,587.

zoontek··on Next.js Layouts RFC: Nested routes and layouts, designed for Server Components
Shameful ad for our own router: https://swan-io.github.io/chicane, with type-safe route consumption and creation (and other goodies).

No weirdness or magic API, the useRoute hook just return a discriminating union with typed params. It's fully-featured and used in prod.

The API is quite simple:

const Router = createRouter({ UserDetail: "/users/:userId" });

Router.UserDetail({ userId: "xxx" }); // safe

zoontek··on Happy New Year HN! What are your plans for the new year?
1. Stop shipping open source libs for a bit, focus on maintenance of the existing ones

2. Ship a SaaS I started working on

3. Improve my sleep

4. Improve my cooking skills

5. Read more books

6. Watch fewer, but better movies

7. Make a few talks

9. Spend more time with my family / my friends. Spend less with the kind who are not really your friends after all

10. Disconnect even more from social medias

11. Learn something new (could be anything)

zoontek··on Using Flutter to build a native-looking desktop app for macOS and Windows
No, you are right. Flutter isn't really native since it uses Skia to render native platform look-alike components (as opposed to react-native which really use the platform)
zoontek··on Show HN: SimpleR State – simple state management for React
I wrote a lib with a very similar API: https://github.com/zoontek/react-atomic-state

It rely on https://github.com/facebook/react/tree/master/packages/use-s..., which make it safe to use in concurrent mode and the implementation a lot simpler.

zoontek··on Ask HN: Best Way to Mock APIs in 2020?
Might not be the best, but the ones I use:

For REST API: https://mockoon.com/

For GraphQL: https://github.com/APIs-guru/graphql-faker

zoontek··on Why the World Needs CSS Developers
This article is wrong about React: it does not generates unreadable CSS class names. CSS in JS libraries do.

By default, using only react + react-dom, you can achieve the exact same output as "handwritten HTML + CSS".

But CSS in JS is not bad either: it generates unique class names by using murmurhash on rules and it makes a lot of sense in a component approach (you can see it like an automatic BEM method).

Even better: The main pain point of this approach (runtime cost) will soon entirely disappear. Linaria already provides a solution, Facebook will soon roll is own (called StyleX for now). It will create a stylesheet file with atomic CSS rules (one rule per class) and replace the classNames directly at compilation time, offering deduplication, eliminates of dead code and maintenability without sacrificing performances. IMHO a huge step in CSS development.