Re:Ask HN: Getting tired of complexity in web development
by schwartzworld on Sunday October 09, 2022 @03:39PM
(#33144473)
> relied on jquery. So if that's the case and we must use some React, what can I do to use it in the simplest and clearest way possible?
The answer to that question has been the same as long as I've been using react. Represent most of your app logic in pure functions. This has been the React team's recommendation, pretty much since the beginning.
Once you get hit to the idea of making everything a function, it pays to learn some functional programming design patterns. This increases your vocabulary for abstracting your application logic into a function.
Once almost everything lives in functions, your react components should really only care about managing the view.
The answer to that question has been the same as long as I've been using react. Represent most of your app logic in pure functions. This has been the React team's recommendation, pretty much since the beginning.
Once you get hit to the idea of making everything a function, it pays to learn some functional programming design patterns. This increases your vocabulary for abstracting your application logic into a function.
Once almost everything lives in functions, your react components should really only care about managing the view.