Tag: React
-
Are propTypes not recommended?
In most cases, propTypes has been superseded by TypeScript. I can’t see any comment from the React team about stopping using propTypes. However, there is…
-
useCallback or not
The first consideration is whether the function is tightly coupled to the component. Could you reuse the function elsewhere in your code base? If you…
-
Should you use multiple useEffects?
Yes, you definitely should use multiple useEffects in your React components. Provided that you need to do so. Why should you use multiple useEffects? The…
-
Do you put watch value into state for react-hook-form?
In short, no. Unless you need to put your watch value into state in a react-hook-form. React-hook-form has the watch function, so you don’t necessarily…
-
Do not define components during render
I just ran into an interesting SonarLint problem. “Do not define components during render” Do not define components during render. React will see a new…
-
Your first React component
Let’s start with the definition of a React component. A reusable, encapsulated piece of the UI that can have its own logic, state, and rendering…
-
Understanding React’s Virtual DOM: A Key to Efficiency in Web Development
One of the core concepts that sets React apart is React’s Virtual DOM (Document Object Model), a technology that contributes significantly to the efficiency and…
-
21 Essential Tips Every React Developer Should Know
In this article, we’ll explore 21 indispensable tips that every React developer should know. These tips will help you write cleaner, more efficient, and maintainable…
-
Using the JavaScript Map Function to Iterate Arrays in React
One of the fundamental aspects of React is its efficient and concise way of handling arrays using the JavaScript map function. In this article, we…
-
No need to import React from 17
In React 17, there is no need to add import React into each file. This is due to the advancements in the refresh mechanism in…