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.
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.
Moreover - the strategy pattern makes it really easy to test as unit test.