After I published my last episode ( • React Clean Code - How to Making the Code ... ) of React Clean Code - The Payment section with round-up logic, I thought that would be the final state.
And then I realised that I could apply the Strategy Pattern to the application and make the application super easy to extend and only requires a minimal amount of changes to the existing code.
So I decided to make another video tutorial. As before, I'm going to show you how to apply Test-Driven Development to add more features to the existing Payment section ( • React Clean Code - How to Refactoring your... ).
We'll learn how to identify code smells and apply small refactorings each time and make the code always in a clean and easy-to-understand state.
Some other useful links for the tutorial:
React Anti-Patterns: https://www.amazon.com/React-Anti-Pat...
Maintainable React: https://leanpub.com/maintainable-react
React Clean Code Book: https://leanpub.com/react-clean-code
Mastering Maintainable React Course: https://www.udemy.com/course/masterin...
Table of Contents:
01:30 - Clean up
07:46 - Strategy Pattern
43:11 - Moving into context
Play it around here: https://codesandbox.io/s/round-up-ref...
Latest Code: https://github.com/abruzzi/round-up-tdd