Re:React I love you, but you're bringing me down
by goatlover on Tuesday September 20, 2022 @12:07PM
(#32913714)
Coming from Ruby and Python, I also prefer class components to hooks. I had to deal with hooks enough in Drupal/PHP which is in the process of deprecating them in favor of Symfony classes.
[ Parent
| on HN ]
Re:React I love you, but you're bringing me down
by nightpool on Tuesday September 20, 2022 @12:42PM
(#32914302)
Drupal hooks have nothing to do with React hooks except sharing a name. What would cause you to compare the two?
Re:React I love you, but you're bringing me down
by goatlover on Tuesday September 20, 2022 @04:56PM
(#32917686)
Drupal hooks are a functional approach to design compared to the OOP approach of Symfony components. As in you use functions to modify/extend existing code instead of inheritance. That's the context of the discussion, not whether they are otherwise similar to React hooks. Anyway, I just tend to think more in terms of making things with classes/objects than with functions.
Re:React I love you, but you're bringing me down
by cooperadymas on Tuesday September 20, 2022 @01:29PM
(#32914980)
Sharing the same name, I presume.