The idea behind Test-Driven Development is quite simple.
Write a test BEFORE you implement your next bit of functionality
Write the minimal implementation needed to make your test pass
Refactor and re-structure what you've written so far as needed
Then just keep cycling through those 3 steps as you build out the rest of your project!
In the following video, I talk about TDD in detail and show you exactly how to start doing it in React.js
Let me know in the comments if you have feedback!