Live data from Hacker News

Hacker News Clone Using GraphQL and React

github.com

41–50 of 187 posts

Re: Hacker News Clone Using GraphQL and React

#42
The way in which Apollo + GraphQL + React work together is just awesome sauce. I love that you can simply declare your data dependencies with a GraphQL query string and Apollo just fetches, wires up and injects the data into your component. I had the pleasure of using this stack for a project once. The speed at which you can move once you have the stack in place and a full grasp of it is pretty mind blowing.

Re: Hacker News Clone Using GraphQL and React

#43
post #29

Earlier quoted context omitted.

Not really. Most of the point of HN is to navigate to it and then away from it (to other sites).

The slightly higher upfront cost is only incurred once.

Well, it's incurred each time you navigate away and then back to HN, which happens any time you click on a link on the front page, right?

Re: Hacker News Clone Using GraphQL and React

#44
This is a nice example of the state of the art of a React & Friends stack. Thank you for building it and sharing it. Is it supposed to be completely functional? Login doesn't seem to work for me, at least.

After 1.1 MB transferred, I experience subjectively sluggish page transitions and less-subjective FOUC on a recent MacBook Pro and Chrome over fast wifi. The features in this stack are impressive and appealing, but IMO they are not worth the general performance cost weighed by hundreds of kilobytes of JS abstractions.

Re: Hacker News Clone Using GraphQL and React

#45
post #29

Earlier quoted context omitted.

Not really. Most of the point of HN is to navigate to it and then away from it (to other sites).

The slightly higher upfront cost is only incurred once.

@sillysaurus3 you can actually leverage browser caching as well.

Re: Hacker News Clone Using GraphQL and React

#47
post #23

Earlier quoted context omitted.

Just from looking at the list of libraries/frameworks/tech used, it seems like it was over-engineered. It was probably a fun project to work on, or maybe it was a good learning experience for the developer, but it seems like it's a wee bit too over-complicated. If someone wanted to release something like this to actual customers then I don't think you'd want to make it like that. This is coming from someone who start…

I am sorry, but your gut feeling of why you think this is over engineered is not an argument.

The list of 14 'Features' should be all you need as an argument.

Re: Hacker News Clone Using GraphQL and React

#48
post #23

Awesome job. This is not a knock on JavaScript in particular, but the amount of brain bandwidth and dependencies to launch a modern web app is getting a bit absurd. I'm turning into that old grumpy hacker who prefers the simple good ole' days of LAMP. :-) React - (UI Framework) GraphQL - (Web Data API) Apollo - (GraphQL Client) Next - (Routing, SSR, Hot Module Reloading, Code Splitting, Build tool uses Webpack) Redux…

Just from looking at the list of libraries/frameworks/tech used, it seems like it was over-engineered. It was probably a fun project to work on, or maybe it was a good learning experience for the developer, but it seems like it's a wee bit too over-complicated. If someone wanted to release something like this to actual customers then I don't think you'd want to make it like that. This is coming from someone who start…

It's just one way to do things, used to demonstrate interesting new tech. It's meant as a helpful pointer similar to TodoMVC and not as a demonstration on how to build Hacker News "better".

Re: Hacker News Clone Using GraphQL and React

#49
post #4

Damn, those load times. This is on all my tests – fast internet or dialup, 2016 desktop or ancient android phone – significantly faster than the real HN. Wow.

Clone: 22 requests | 1.1 MB transferred | Finish:2.86 s | DOMContentLoaded 636 ms | Load:2.87 ms Real Hacker News: 6 requests | 11.5 KB transferred | Finish: 336 ms | DOMContentLoaded: 325 ms | Load: 343 ms Hacker News is just a static cached webpage

They've implemented this as a SPA so all the pages are downloading at once not just the home page. Probably could be optimized with some lazy loading. Still, vanilla HN obviously has no framework so no need to download React/Apollo, etc. I'm gonna go out on a limb and assume that they're using this as a learning tool and a teaching tool. Just like no one needs a framework to implement a TO DO list, but that's the go to example app.
Post reply on HN