Live data from Hacker News

Progressive React

houssein.me

71–80 of 88 posts

Re: Progressive React

#71
post #31

Earlier quoted context omitted.

If all you want to do is serve up HTML... you don't pick react.

I've used React as a server-side templating language on many projects small and large. The main feature that makes React great for rendering HTML is higher-order components. In my experience any project of sufficient complexity starts to get ugly with a "regular" templating language. React encourages composition of small isolated components, which tends to result in code that is easier to understand and maintain. Adm…

Yeah that's totally true.

Really everything is delivering HTML ... and maybe something else.

I was thinking in the simplest form as the person I was responding to seemed to be saying that just to do something ultra basic react was not something they liked.

Re: Progressive React

#73

Earlier quoted context omitted.

React isn't used for webSITES. It's used for web applications.

Hah, I wish.

It's a choice really.

There's ways to do a lot of things (I swear that is the real sticking point on HN when it comes to react discussions).

But just serving up straight HTML, you could actually use react, but you don't have to do it "just" to do that.

If you're stuck in a spot where you HAVE to use it, that's the fault of whomever decided that, not react.

Re: Progressive React

#75

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

Yeah, this made my whole browser lag (buttons-shading-five-seconds-after-hover-level lag). FireFox Quantum on Windows 10 with a pretty badass CPU. Also slow in Opera. Also slow in Vivaldi. And it crashed Chrome Canary. For a web-tech post, this is pretty fucking bad.

Works fine for me in Chrome stable on Linux, Mac, Windows and Safari iOS, Mac.

I also tried scrolling a number of different ways - with autoscrolling, mousewheel, page up/down and arrow keys.

All of the machines I tried it on are 4-5 years old except for my iPhone which came out in 2017.

Re: Progressive React

#76
post #55

Earlier quoted context omitted.

Hi, I'm a Redux maintainer. If you've got any specific concerns I can help with, I'd be happy to try to offer advice. Out of curiosity, what issues have you been seeing with using thunks? I'd specifically encourage you to check out our new official Redux Toolkit package. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creatin…

I'm still new to redux and I'm learning using angular ngrx. I realize ngrx is just inspired by redux. What's the team relationship? Are these the same maintainers, is there a ngrx toolkit?

No, the Redux and NgRX teams are completely separate. We've occasionally chatted briefly online, but that's it.

Re: Progressive React

#77

Earlier quoted context omitted.

Hi, I'm a Redux maintainer. If you've got any specific concerns I can help with, I'd be happy to try to offer advice. Out of curiosity, what issues have you been seeing with using thunks? I'd specifically encourage you to check out our new official Redux Toolkit package. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creatin…

Thunks can be an anti-pattern. They encourage multiple dispatches to redux which can leave people designing "set data" style reducers rather than more meaningful ones. Parent comment suggests sagas and that's much better. An action in a component dispatches one thing and the saga can co-ordinate all of the logic.

> "set data" style reducers

I've heard this before but don't really understand it. Most of my reducers are storing and maybe updating data loaded from the server. What's wrong with this pattern?

Re: Progressive React

#78
post #77

Earlier quoted context omitted.

Thunks can be an anti-pattern. They encourage multiple dispatches to redux which can leave people designing "set data" style reducers rather than more meaningful ones. Parent comment suggests sagas and that's much better. An action in a component dispatches one thing and the saga can co-ordinate all of the logic.

> "set data" style reducers I've heard this before but don't really understand it. Most of my reducers are storing and maybe updating data loaded from the server. What's wrong with this pattern?

Our new "Style Guide" docs page gives a recommendation to "model actions as 'events', not 'setters' [0], and there were two recent talks on this topic that go into a lot more detail [1] [2].

[0] https://redux.js.org/style-guide/style-guide/#model-actions-...

[1] https://github.com/dmmulroy/talks/blob/master/event-driven-r...

[2] https://youtu.be/K6OlKeQRCzo?t=2626 / https://rangle.slides.com/yazanalaboudi/deck#/

Re: Progressive React

#80
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.

Rails salaries are lower than .net where I live. Where do they command $$$?
Post reply on HN