Isn't `useContext` the builtin React alternative to that issue?
I think the new memo compiler address' this in the most complicated way possible.
Wow that's really bad and make it basically useless.
I still think Zustand is the simplest state management, while staying efficient. It's similar to the old Svelte stores. But I have used many state management tools and the re-renders were not the problem when it came to speed.
function MyProvider({ children }) {
const [value, setValue] = useState()
return <Context.Provider value={value}>
{children}
</Context.Provider>
}
In the above example, the Provider re-renders, but it's children remain unchanged.