relay-tools / relay-hooks

Use Relay as React hooks
https://relay-tools.github.io/relay-hooks/docs/relay-hooks.html
MIT License
540 stars 56 forks source link

unsubscribe only if the callback function is still subscribed #154

Closed morrys closed 3 years ago

morrys commented 3 years ago

issue: https://github.com/relay-tools/relay-hooks/issues/151

for version 3.7.0 edit this: https://github.com/relay-tools/relay-hooks/blob/v3.7.0/src/loadQuery.ts#L99

with if (listener === callback) {listener = null; }