Closed davidkaneda closed 1 year ago
Ah, I just looked at the source and see that unregister
is just being called on unmount, so not when the deps actually change. Is that intentional?
unregister
is called whenever your dependencies change; it works just as a useEffect
would.
templates
coming from?templateActions
? are there actions with duplicate id
s there?templates
comes from a static import
, there shouldn't be any duplicates in the templateActions
output-
Interestingly, the duplication doesn't happen if I remove the "parent" field. "new-template" is a parent action I define statically somewhere else-
Moving the parent action into the useMemo
seems to have fixed it-
Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm getting every result below repeated 3x in the UI, using the following code. (
useMe
is a call touseSWR
, updates dynamically/async)It feels like the call to
unregister
inuseRegisterActions
isn't actually removing them each time the deps change.