Cleaner way to write this in React?

Hey guys, I have a custom hook here:

And the state is being used in this component (Being my top level component). I am passing down functions and the state down as props as other child components rely on this logic, however, whenever I filter, it then re-renders the entire app (which cannot be good).

I can’t think of another way to clean this up. Any help is much appreciated.

i like this.i think as long as it helps you to maintain your code easier its a good thing