DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for React Test-Driven Development (TDD)
Marius Espejo
Marius Espejo

Posted on

React Test-Driven Development (TDD)

The idea behind Test-Driven Development is quite simple.

  1. Write a test BEFORE you implement your next bit of functionality

  2. Write the minimal implementation needed to make your test pass

  3. 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!

Top comments (9)

Collapse
 
rlgino profile image
Gino Luraschi

Excelent!!

Collapse
 
marius profile image
Marius Espejo

thanks Gino!

Collapse
 
yaser profile image
Yaser Al-Najjar

Nice and easy to grasp tutorial πŸ‘Œ

The sound is also pretty clear... would love to know which mic is that @marius

Collapse
 
marius profile image
Marius Espejo

Thanks! I appreciate the feedback.

I am using the Shure SM7B mic in this video, it's a bit expensive (and to be honest debating if it was worth it so I appreciate you mentioning the sound). If you're looking for a starter mic I would recommend starting with something like the Blue Yeti (used in my older videos) or AT2020.

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited on

Thanks!

I actually use Blue Yeti, but it's heavy and I don't have it right now at home. So I was thinking about buying another mic... turns out that this one is even more expensive 😁

BTW, with Blue Yeti to get a better high quality recording closer to yours (I guess), I use adobe audition processing.

Collapse
 
carlosrafael22 profile image
Rafael LeitΓ£o

Great video, Marius! πŸ‘

Collapse
 
marius profile image
Marius Espejo

thank you glad you like it!

Collapse
 
aadit017 profile image
Aadit

Gr8

Collapse
 
marius profile image
Marius Espejo

thanks!

typescript

11 Tips That Make You a Better Typescript Programmer

1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields

...

Read the whole post now!