#reactjs
Read more stories on Hashnode
Articles with this tag
Today, while doing my day-to-day tasks, I come to observe that my API call in useEffect runs twice, I knew that it was re-rendering because of the...
While working with React library, you already understand well that whenever any props value or state of that particular component changes then it...
Early Return Early Return is a pattern that suggests we avoid nested if-else statements by checking the preconditions and return or throw as early as...
Using Inline Ternary Operator Conditionally Spreading the Object Properties We can use ternary or logical && operator, along with the spread operator,...
There are multiple ways to mock an event handler in Jest Testing Framework. I will discuss two different scenarios and further, we will introspect...