Hacker News new | past | comments | ask | show | jobs | submit login

React as a library (and a rendering idiom) is not complex enough for you to not decide for yourself whether to use it or not.

But “React” community practices include approaches that you may find anywhere on why..yagni..cargocult..bizarre spectrum. Even it’s own state management routines require you to think orthogonally to everything you know and used before. So as a rendering engine it’s okay, and maybe the best due to its widespread nature, but I wouldn’t go any deeper than that.

On the pro side, React isn’t tightly coupled to its state, so you can connect your own state to its rendering cycle. If your hobby is making products, not frameworks or meta-things, it has no value for you in my opinion. Stick with svelte, vue or lesser frameworks like mithril, whichever fits your needs better.

This opinion comes from a guy who avoided web ui like hell, but had to take a dive 3 years ago. Since then I used vue, mithril, react, researched multiple lesser/toy frameworks. Before that I was using Gtk/Gdk, Qt, Wx, AppKit, UIKit at work, and was toying with many desktop/mobile ui frameworks including the ones created by myself. Frankly, React feels like a pile of… idk it’s not even BS, something completely out of this world. As if someone learned nothing but js and html, read about FP and made first insecure steps into this journey.




Have you ever actually used React? I ask because the only way I can think of you writing the things you did is if you lack understanding of, well, react fundamentals. I don't think you understand what React does, or why or how it works if you think that react's state management is just some redundant complexity that it added just for shits and giggles.


If you mean React as a library, then yes, not at work though. If you mean React as the community does it, well no, too much repetitive code to do basic things.

I don't think you understand what React does

I’m afraid that anything I say here would lead you to think that I was jQuery, but no, I never wrote a line in it. I had these conversations before, so please excuse me for this digression. I know how React works, and I could build it myself, barring some optimizations. You are right, I don’t “get it”, but not in a sense of how it works, but why it does that. It solves the issue that exists in jQuery and other call-manual-update approaches, but that is not an issue in what I worked. It reinvents a wheel that was already there when it was born. I spent enough time with it and its community to check these ideas.

I’d like to hear what you have to say though. Maybe there is something I missed.


> Even it’s own state management routines require you to think orthogonally to everything you know and used before

What do you mean by this? I've really only used React in my career so I don't have a frame of reference. Are you just talking about having to keep immutable state?


It’s just too much to tell on a forum. You may start here https://developer.apple.com/library/archive/documentation/Co... (it’s not really Apple specific, it just has good overview guides). If you want a quick answer, state lives apart from views and is controlled by either predefined or custom behavior. It also doesn’t have to be flat (which React endorses) and smeared over a hierarchy of tiny proxy “components” which cannot really live outside of that hierarchy. Also, cocoa way is not the only way, and React is compatible with other approaches, some of which react guys call “stores”.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: