React/react hooks: child component is not re-rendering after the state is changed?
问题 I am writing a code in react/react hooks that attempt to do the following. Get an array of objects from the parent component as a prop Set it as a state using useState hook. Sort the state according to the intended filters (Time and Rating), and re-render the child component. What I see is that the below code updates the state after sorting, but even though the state is updated, the child component that is dependent on the state would not re-render. I thought the child component would