Show HN: Hacker News clone using Remix and React
80 points| clintonwoo | 4 years ago |github.com | reply
This project was a pleasure to do, Remix has very good developer experience. But further than that it's actually a really good way to develop applications, it's a mix of old meets new where the paradigm encourages you to take advantage of web standards for data fetching (forms, links, a tags).
And it turns out that it's actually an optimal way to develop simple or even complex web applications which can deploy in a number of runtime environments (including edge workers). So you can get an insanely fast website for users. Note that this project is not necessarily an optimal website implementation (since it copies Hacker News) but rather it's intended to be useful as a starting point or reference for your own projects!
You can read about some of the benefits of it on the project page linked.
By the way I'm currently available to work (if you email me at clinton.dannolfo @gmail!)
[+] [-] ahmedfromtunis|4 years ago|reply
I never worked with, or even tried, React and such libraries but a bit surprised. The code in this version here must be much more complexe, and the server much smaller, yet (feels as if) it is faster.
Am I the only one experiencing this and surprised by it?
[+] [-] alana99|4 years ago|reply
The alterative is an old school style web server that returns a new HTML file and page reload on every navigation which is higher download and runtime cost (which is how the real HN does it!). No criticism here as the site definitely works well regardless.
[+] [-] cyral|4 years ago|reply
[+] [-] sergiodxa|4 years ago|reply
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] password4321|4 years ago|reply
[+] [-] woah|4 years ago|reply
[+] [-] woah|4 years ago|reply
https://news.ycombinator.com/from?site=github.com/clintonwoo
Might be fun to compare
[+] [-] clintonwoo|4 years ago|reply
It's not necessarily an apples to apples comparison of web servers though, since the NextJS one is also using GraphQL which adds extra response time. The remix one is also running on fly.io instead of a regular VPS in middle america just to cope with extra HN traffic.
[+] [-] benmccann|4 years ago|reply
It's not exactly an apples-to-apples comparison for a number of reasons including implementation and hosting differences, but might be interesting to people anyway. The code lives here: https://github.com/sveltejs/sites/tree/master/sites/hn.svelt...
[+] [-] password4321|4 years ago|reply
[+] [-] msoad|4 years ago|reply
If you don't know, RSC allows the HTML from server to start streaming as React is rendering the components in the backend. It allows fine grain control to what part of page renders first and which parts can be rendered later as HTML and data is streaming from the server. Before this, all of React server frameworks would render the entire page, shove "hydration data" in it which is mostly repeated data that is used to render the page and also include that HTML in the form of complied JSX in the page in the page scripts. Obviously that would make React SSR very bulky and unscalable. That's why RSC can solve so many React performance problems
[1] https://github.com/vercel/next-react-server-components
[+] [-] kentcdodds|4 years ago|reply
If React Server Components can improve things for Remix (they can't right now, but maybe they will get better?) and if it is ever released (it's been 5 years now... and they still are saying they've got a long way to go), then Remix will ship support for them and it will be a non-breaking change for Remix users.
[+] [-] ryanflorence|4 years ago|reply
We already have experimental versions of Remix running on React 18 and have experimented with RSC, Suspense, and streaming extensively. In their current state however, we're not seeing them beat Remix's current approach in production results or developer ergonomics. We've been providing the React team with our feedback. When these features from React are ready, Remix will be able to easily support them.
[+] [-] nvegater|4 years ago|reply
For example, where are the styles for the skeleton ? Why inserting CSS with "dangerouslySetInnerHTML" in the index.js ? Maybe its easy and I am missing some obvious stuff but the code doesnt seem very readable to me. Maybe is due to the nature of Server Components in Nextjs ? Would be nice to hear someone else's opinion on the patterns used in this repo.
OPs code on the other hand is a piece of cake to understand. Really good job!
[+] [-] dannyphantom|4 years ago|reply
[+] [-] lowboy|4 years ago|reply
[+] [-] assemblylang|4 years ago|reply
[0] https://hackerxp.com/
[+] [-] loanl|4 years ago|reply
[+] [-] TameAntelope|4 years ago|reply
Very great work! I love destroying the notion that you have to use some esoteric hyper-optimized tech to get quality performance.
[+] [-] k__|4 years ago|reply
I don't know the stats, but I could imagine that HN is used by quite some mobile users, so an UX update would be appreciated.
[+] [-] austinkhale|4 years ago|reply
Side note: seems like there is some sort of issue when swiping back on iOS Safari. Periodically getting flashes of the incorrect content.
[+] [-] baobabKoodaa|4 years ago|reply
> Most apps can be built leveraging web fundamentals (form/anchor tag) requiring no state management library
[+] [-] clintonwoo|4 years ago|reply
Remix also provides a higher level <Form> React component and hook with support for extra states like loading etc!
[+] [-] azangru|4 years ago|reply
And other videos on their youtube channel discussing their framework: https://www.youtube.com/c/Remix-Run/videos
[+] [-] unknown|4 years ago|reply
[deleted]
[+] [-] terrycody|4 years ago|reply
[+] [-] unknown|4 years ago|reply
[deleted]