Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Test-Driven Development with React
Rating: 4.1 out of 5(75 ratings)
13,017 students

Test-Driven Development with React

Learn Test-Driven development to build more reliable and maintainable apps.
Created byIrek Mirgaleev
Last updated 4/2021
English
English [Auto],

What you'll learn

  • Test-Driven Development

Course content

4 sections24 lectures1h 12m total length
  • App overview0:40

    See how test-driven development guides building a home rental app in react, with an api-loaded home list, a booking dialog for check-in and check-out, total cost, and a toast confirmation.

  • Prerequisite knowledge1:14

    Build prerequisite knowledge in React unit testing, familiarize with useState and useEffect, optional Bootstrap styling, and understand behavior subject as a simple observer-subscribe pattern for emitting and listening to events.

  • Setting up the app2:24

    Set up a new React app, install bootstrap, add bootstrap imports, place an image in the public folder, and scaffold header and homes components with auto import.

Requirements

  • React basics
  • React unit testing basics

Description

If you already heard of TDD but were wondering how it is supposed to work for developing React apps, this course is for you. We will build a few features in a pretend home rental application. I will show you how to write a failing test first (step 1), then make it pass by writing code (step 2), then refactor the code (step 3). These features include:

  • building the app header (easy)

  • fetching the list of rental homes from the API and displaying it on the page (intermediate)

  • building a rental booking dialog (complex)

After completing this course, you will gain the full power of TDD which provides you with:

  • better focus: you end up writing a lot less code because you need just enough to make the test pass, and anything else is a distraction and can be ignored

  • better architecture: you get less tightly coupled code and more cohesive components

  • fewer bugs and simpler maintenance

  • high test coverage: you have more confidence that everything is working

  • documented behavior: the tests describe the intended behavior of the component and document the edge cases

  • it's easy to pick up after the last context switch: when I return to my code the following day, the next step is always to get the test to pass or write the next one or refactor

Hope you'll find this course helpful. Please don't hesitate to leave feedback!

Who this course is for:

  • Intermediate React developers