Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I remember a while ago, if you were to mention HOC wrapper hell in React community, most folks would jump to defend it.

Eventually, React team accepted that it is a problem, and presented hooks as a solution. The very same people who would defend wrapper hell yesterday, would start crapping on it today.

I think you're right that hooks are flawed and not the final answer, but the community won't accept it until "React gods" say so. It would be quite funny if React team eventually decides to go compiler way (a la Svelte) and all the people grasping for reasons to hate Svelte would have to change their opinions again.



Totally agree.

The ultimate solution (imo) will come from the functional programming world and it will be a component monad, just it won’t look like that to the end user. It will probably leverage function-star in JS. It will enable unit testing of all component interactions and everyone will say it’s the best thing since sliced bread. Clojure devs will look on wondering why it took so long. Just my hunch!


React is already looking to use a compiler, but for memoization rather than fully removing the VDOM.




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

Search: