What does happen when react re-renders a component?
Lets take an example of using useState:
import { useState } from 'react';
export default function Counter() {
const [count, setCount] = useState(0);
function handleClick() {
setCount(count + 1);
}
return (
<button onClick={handleCl...
bikash8848.hashnode.dev2 min read