-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
This few lines here:
if (process.env.NODE_ENV !== "production") {
const check = mapStateRef.current(state);
if (!is(check, res)) {
console.warn(
"useMapState returns new identity on every run. This causes the component to render on every Redux state change. Consider use using useSelect().",
res,
);
}
}
this is so so excellent. You have saved me so much time. It cought every single place I mistankely was returning new identities and/or in general misconfiguring stuff. I know you are sort of using this as a prototyping for official redux hooks, so I just want to encourage you that this sort of warning is also included there.
Metadata
Metadata
Assignees
Labels
No labels