How to solve the “Warning: Can’t perform a React state update on an unmounted component.” when using React Hooks

Situation You are having a React Component using Hooks. In that component, you use useEffect to perform some asynchronous actions and update the component state. const [count, increase] = useState(0); useEffect(() => { //count will increase after 3 secs setTimeOut(() => increase(count++), 3000); }); Problem When you run the app and there is a warning... Continue Reading →

ID VERSUS CLASS IN HTML

When I started working with HTML, I was confused about the id attribute and the class attribute of an element. I didn't know the differences between them so I used them arbitrarily. After some small projects, I have realized their differences and how to use them more correctly. Let's see the definition of those attributes:... Continue Reading →

Tạo một blog trên WordPress.com

Lên ↑

Tạo trang giống vầy với WordPress.com
Hãy bắt đầu