Hacker News new | ask | show | jobs
by flyingchipmann 1690 days ago
Uh, the hooks in the new versions literally solved this problem. And is backward compatible although it's somewhat painful if you work with both the class based and hook based base code base at the same time.

But if you use an current opinionated package. Next.js + pure hooks based+ typescript, beats everything on the market by miles. It's not even close.

2 comments

And how to do you structure the business logic that is connected via hooks?
What is your definition of business logic? Business logic as I know it doesn't belong in the front-end at all. Your business logic should be taken care of on the back-end and your front-end application responsible for displaying the end-result.
the same how you would do it in angular, you write a service class or function, you can structure those however you want.
Yes the answer to the complaints above is Next.js + hooks + Typescript. Absolutely fine if that isn't your cup of tea, but let's not kid ourselves that a solution isn't already available.
But the hooks literally solved the logic problem. I know what the complain means as I have worked on old code base. But I don't see anything better than handling cross cutting logic better than hooks. A pure hook based code base is not just the best in browser, but also better any other UI technologies in other platforms I have ever seen. This is my personal opinion. Could you show me a better way?
I think they actually agree with you, unless my reading comprehension is terrible today (I’m prepared for that to be true)
My bad, misread.
I do it every day :)
The person you replied to, agreed with you.
My bad, misread.