Live data from Hacker News

Progressive React

houssein.me

21–30 of 88 posts

Re: Progressive React

#21

It's funny because scrolling in this article is a stuttery mess (Firefox on Linux).

FWIW I have a $150 crap phone and the mobile version, while looking a little scruffy, loaded in 3 seconds and scrolled fast to the bottom no problem.

Re: Progressive React

#22

Earlier quoted context omitted.

I call this the 'Rails Paradox'... a lot of people invested into Rails and wrote a lot of software that powers small businesses. As people exited Rails, the cost of maintenance has gone up... since you have to pay a lot to get someone writing Rails now.

If it weren't for Rails then maybe those small businesses would not be as successful as they are and wouldn't be around now. Rails is definitely more niche but it's still a great framework IMHO and it's not dead. Still gets feature updates to this day.

Hope it is not dead. I still haven't taken the time to learn it yet.

Re: Progressive React

#23
post #4

Earlier quoted context omitted.

How do you figure?

I call this the 'Rails Paradox'... a lot of people invested into Rails and wrote a lot of software that powers small businesses. As people exited Rails, the cost of maintenance has gone up... since you have to pay a lot to get someone writing Rails now.

I do think that React has a chance at beating this trend though. As Rails became more and more esoteric with DSLs, utility functions, and `method_missing` hacks that make complex existing monolith codebases nearly inscrutable, and microservices became a preferred way to "throw bodies" at similarly complex codebases, it's not surprising that people started moving away.

React's ecosystem, on the other hand, has embraced strong typing (and alongside it, tooling that lets you drill deep into any method you see on the screen), and it's fully compatible with teams working on discrete backend and frontend components. It's not likely to disappear any time soon, the same way jQuery hasn't disappeared. Yes, it adds a performance cost, but so long as Zawinski's Law holds [0], functional state-to-display-object transformations will continue to be the paradigm, and React continues to lead the pack there. And if new display object abstractions come into play (say, React Native in-browser rendering widgets on the GPU directly via webasm or new browser-specific APIs), React can and will adapt.

Just my 2c.

[0] https://medium.com/programming-philosophy/zawinskis-law-2090...

Re: Progressive React

#25
post #20

Earlier quoted context omitted.

Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering. Jokes aside, everything has its place. You're still allowed to hate it though. For example, I hate Redux because everyone uses it for every React app and it's got boilerplate up the wazoo. Just know that if you "hate" things, though, you won't learn as much in life, like I won't learn how to use time travel debugging…

Is there a way to cutdown the bloat?

Not in a substantial way. The boilerplate is a consequence of the functional “workaround”: representing a mutation as the result of applying a state transition to a complex state, and then computing what to display as a function of both the current and previous states.

The way to reduce the boilerplate is to use a mutable paradigm, but then you lose the simplifications that the immutable paradigm gives you.

Re: Progressive React

#26
post #20

Earlier quoted context omitted.

Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering. Jokes aside, everything has its place. You're still allowed to hate it though. For example, I hate Redux because everyone uses it for every React app and it's got boilerplate up the wazoo. Just know that if you "hate" things, though, you won't learn as much in life, like I won't learn how to use time travel debugging…

Is there a way to cutdown the bloat?

I'd recommend checkout out Redux Toolkit and reading over the docs. Severely cuts down the boilerplate, but still walks you through the general ideas and fundamentals in a great way.

Re: Progressive React

#28

The more I deal with it, the more I hate React, and the very idea that websites must require Javascript to just show HTML.

Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering. Jokes aside, everything has its place. You're still allowed to hate it though. For example, I hate Redux because everyone uses it for every React app and it's got boilerplate up the wazoo. Just know that if you "hate" things, though, you won't learn as much in life, like I won't learn how to use time travel debugging…

I’m not sure this is true. For example, what can I learn from JS that isn’t in better languages? In tech we have this weird situation where many things become popular without good reason. It’s ironic, because a group of people (nerds) who think they are the epitome of rationality are actually the opposite: we make very emotional decisions when we could be entirely rational, as we have access to data other fields do not.

Re: Progressive React

#29
post #20

Earlier quoted context omitted.

Is there a way to cutdown the bloat?

Not in a substantial way. The boilerplate is a consequence of the functional “workaround”: representing a mutation as the result of applying a state transition to a complex state, and then computing what to display as a function of both the current and previous states. The way to reduce the boilerplate is to use a mutable paradigm, but then you lose the simplifications that the immutable paradigm gives you.

Check out lit-html. You write functional style code, but the library does efficient minimal mutations of the dom with no virtual dom, and no dom diffing.
Post reply on HN