DEV Community

Discussion on: ⚛️ Applying Strategy Pattern in React (Part 1)

Collapse
 
itswillt profile image
Will T. • Edited

Thanks for your feedback! Great to hear that it was a good read.

Actually, I'm not using a class component here. Also, this can be implemented using hooks, but the logic is quite pure and not coupled to React at all, so I don't want force the logic into a hook.

Collapse
 
verthon profile image
Krzysztof Sordyl

Moreover - the strategy pattern makes it really easy to test as unit test.