DEV Community

Nathan Kallman
Nathan Kallman

Posted on

Test Driven Development in React: do you do it?

Do you successfully practice TDD (e.g. a red-green-refactor loop) while creating React/ReactNative components? How do you set yourself up for success?

Top comments (1)

Collapse
 
kallmanation profile image
Nathan Kallman

Where I love doing TDD in backend/server work, I've found it onerous to do red-green-refactor against React components...

It also seems most other people have given up as I see a large effort towards "snapshot" testing. Since you can't take a snapshot of something that doesn't exist yet, that approach cannot do TDD in any sense.