Live data from Hacker News

Hacker News Clone Using GraphQL and React

github.com

51–60 of 187 posts

Re: Hacker News Clone Using GraphQL and React

#51

Hey, so, uh... all you need to clone HN is Postgres and some HTML/CSS and a smidgen of JavaScript. Good God, must we pull in the entire JavaScript ecosystem for a simple forum now?

This is why the JS community is so fucked. They take what should be a simple website and needlessly complicate it by (poorly) reimplementing what web browsers can already do.

I'm on the fence for this one. While I completely agree that the JS community is as you say "fucked." There are so many fast moving framework redesigns that make for huge incompatibilities during these paradigm shifts. Super annoying community.

However, I love the advantage of exchanging the most minimal amount of data between a browser and the server for each additional page load (ie: JSON response).

Re: Hacker News Clone Using GraphQL and React

#52

Hey, so, uh... all you need to clone HN is Postgres and some HTML/CSS and a smidgen of JavaScript. Good God, must we pull in the entire JavaScript ecosystem for a simple forum now?

It's called a 'reference architecture'. It's intended to be used as a teaching tool and learning tool for a stack that has tremendous benefits for applications more complex than HN. Since everyone is familiar with HN on HN, they can look at that code and understand how it fits in with the big picture without having to learn a new app PLUS a new architecture.

[1] https://en.wikipedia.org/wiki/Reference_architecture

Re: Hacker News Clone Using GraphQL and React

#53
post #50

I went down the path of learning Relay instead of Apollo. I'm regretting this decision. Relay is too restrictive, and the relay compiler is far too sensitive for most server side endpoints.

What put the nail in the coffin to Relay for me was watching a talk by the dev team where they said they don't want to create proper documentation because they feel like that's creating a contract with the community to support the API. It's somewhere on YouTube sorry I can't find it now.

Re: Hacker News Clone Using GraphQL and React

#54
post #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…

Are you saying that you put your regular hacker news credentials into this system?

Re: Hacker News Clone Using GraphQL and React

#55
post #27

I don't know, it feels slower than the original, because when you click on comments, it first loads an empty page and the actual content loads 1-2 secs later, which looks very jarring.

Agree. A bit dissatisfactory, but totally useable loading comment pages; especially on posts that have > 200 comments. See example:

http://www.hnclone.win/item?id=15342486

Re: Hacker News Clone Using GraphQL and React

#56
The latency of clicking on the "comments" link is greater than actual HN (about 0.9s) for an example I tried, of which about half is spent in the POST network request, another half in JavaScript and layout/rendering/painting. For actual HN the whole process is well below 0.5s.

Seems like with more comments it is much slower.

Re: Hacker News Clone Using GraphQL and React

#57
post #54
post #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…

Are you saying that you put your regular hacker news credentials into this system?

Yah don't put your credentials into this. Tisk tisk. If you did, change your HN password.

Re: Hacker News Clone Using GraphQL and React

#58
post #50

I went down the path of learning Relay instead of Apollo. I'm regretting this decision. Relay is too restrictive, and the relay compiler is far too sensitive for most server side endpoints.

Interesting. I've worked with Relay almost since its release, more recently on the modern branch, and haven't run into anything that's been too restrictive. You have an element of thinking about things in "Relay" terms (in the sense of how to structure them) but once you've figured that it then things just work (TM).

I'm curious about the second part of your statement, the compiler being too sensitive for your server side endpoints, can you elaborate on that a bit?

Re: Hacker News Clone Using GraphQL and React

#59

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.

Completely agree. People complain about the state of web dev but we’ve honestly never had it so good.

Re: Hacker News Clone Using GraphQL and React

#60

While I don't want to belittle this accomplishment. The magic of Hacker News is the community that is on it. As a piece of technology NH isn't all that impressive. This kind of feels a little over-engineered. Edit: To downvoters, care to explain why I am wrong? The project is extremely well done. It is impressive in its documentation and execution. But in the real world done, launched, and with traction is more impor…

You’re being downvoted for completely missing the point of the project.
Post reply on HN