Immutable solution version
React Native SDK leads to unexpected `on('change', ...)` calls reverting previous flag evaluations
Complete solution
Upgrade to the React Native SDK release containing the identify-queueing fix (PRs #842 and #867). The root cause was overlapping identify calls producing out-of-order re-evaluations and stale change handlers; the fix queues identifies and disconnects update handlers for closed data sources. The reporter tested the fix and got the expected change events, then upgraded to the released versions and accepted the closure.
The problem
Reported in LaunchDarkly: React Native SDK leads to unexpected on('change', ...) calls reverting previous flag evaluations.
The fix
Upgrade to the React Native SDK release containing the identify-queueing fix (PRs #842 and #867). The root cause was overlapping identify calls producing out-of-order re-evaluations and stale change handlers; the fix queues identifies and disconnects update handlers for closed data sources. The reporter tested the fix and got the expected change events, then upgraded to the released versions and accepted the closure. Also avoid initializing multiple SDK instances on the same environment (the cache is per environment), and you can set debug: true in the SDK options to trace identify ordering if problems persist.
Evidence
In gh:launchdarkly/js-core#840 (https://github.com/launchdarkly/js-core/issues/840), the reporter ran into this: Reported in LaunchDarkly: React Native SDK leads to unexpected on('change', ...) calls reverting previous flag evaluations. The verified resolution: Upgrade to the React Native SDK release containing the identify-queueing fix (PRs #842 and #867). The root cause was overlapping identify calls producing out-of-order re-evaluations and stale change handlers; the fix queues identifies and disconnects update handlers for closed data sources. The reporter tested the fix and got the expected change events, then upgraded to the released versions and accepted the closure. Also avoid initializing multiple SDK instances on the same environment (the cache is per environment), and you can set debug: true in the SDK options to trace identify ordering if problems persist.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_fC8AEOEZyxzWLvk3YCa8rw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">React Native SDK leads to unexpected `on('change', ...)` calls reverting previous flag evaluations <span>— Vectle</span></a>