Test driven development in ReactJS
Suppose you are developing a large website/mobile app and your task is way too complex. Under these circumstances Test driven development can help in controlling complexity. It gives developers breathing space. It lets them keep code bug free from the ground up. You would not believe it but most people get burnouts from developing software if they aren't adopting TDD. So how do you do Test Driven Development? TDD for short is by writing a test case before you write even one line of code. Naturally the test case will fail initially. This gives the developer some breathing space, some respite of having written something like a test case no matter if the code that is going to be tested is unwritten as yet!!!. Now I am going to show a component that I wrote following an article on the internet that spoke of TDD. import React from 'react' ; export default class MyComponent extends React . Component { ...