I am still learning about custom hooks atm! Would you mind elaborating more on that and how it is easier than writing HOC for readers who just started exposing to functional components? thanks!
I'm not sure I can explain this in couple of words 🙂 In general, HOCs require you to combine and destructure passed props which is always cumbersome. Implementing some logic atop of it adds more complexity. Perhaps you find interesting my post on creating no-lib global store. I implement it with hooks, and that's trivial; then reimplement the same with HOCs, and that looks very convoluted.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am still learning about custom hooks atm! Would you mind elaborating more on that and how it is easier than writing HOC for readers who just started exposing to functional components? thanks!
I'm not sure I can explain this in couple of words 🙂 In general, HOCs require you to combine and destructure passed props which is always cumbersome. Implementing some logic atop of it adds more complexity. Perhaps you find interesting my post on creating no-lib global store. I implement it with hooks, and that's trivial; then reimplement the same with HOCs, and that looks very convoluted.