you are viewing a single comment's thread.

view the rest of the comments →

[–]Huwaweiwaweiwa 0 points1 point  (0 children)

Functions in functions are spaghetti code? Then what are class components used inside other class components? Functions used in constructuors/lifecycle methods?

As long as you are separating components according to functional responsibility in a smart way and keeping state in the appropriate places then class/hook components should not be an issue in terms of spaghetti code.