How to avoid rerender all child components which in loop when parent component state update
问题 I m having one child component which is inside a loop of parent component. when one of the child components is updating the state of parent component, it is re-rendering the all children since it is loop. How can i avoid the re-render for each iteration. function Parent() { const [selectedChild, setSelectedChild] = useState([]); const onChangeHandle = (event, id) => { const checked = event.target.checked; let updatedArray = [...selectedChild]; if(checked){ if(!selectedChild.includes(id)){