News for hackers. Stuff that matters.
Re:Ask HN: Why React? by neontomo on Monday June 10, 2024 @02:24PM (#40636516)
I haven't used your stack, but my main benefits of React are:

- People will pay me to build with it

- State - Update a value and all the places that uses the value get updated without any extra fiddling. If your pages are very dynamic or uses lots of use interaction you skip a lot of complexity

- Components - All components end up in their own file, adding reusability and clarity to the logic

- NPM packages - Easily add extra functionality

- JSX - It's a delight to write "HTML" and embed variables and functions directly where you need it

Re:Ask HN: Why React? by beryilma on Tuesday June 11, 2024 @08:04PM (#40653092)
I am not a web developer. But, in general, I don't understand why state management is considered to be a big difficulty needing a framework.

We have been writing complex standalone apps for decades without needing frameworks and they manage state just fine. At least for medium size GUIs, state management can be done with a few simple architectural conventions, MVC pattern, etc. May be I am missing something special to web applications...

Re:Ask HN: Why React? by meiraleal on Tuesday June 11, 2024 @09:38PM (#40653613)
Web is a little monster.

It's very common the need to manage state in 3 different levels: tbe local one, the one shared between running instances/tabs and the server. It is not simple to keep them synced the right way if that's a requirement.