-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: React Native
-
1 - XS (<= 1 day)
-
927
When using addListener(objects, changes) on React Native iOS it always returns empty on the first notification and the second notification returns what should have been in the first one.
I found in results-tests.js below that first notification is empty.
Is this by design or am I doing something wrong here?
realm.objects('TestObject').addListener((testObjects, changes) => { // TODO: First notification is empty, so perform these // assertions on the second call. However, there is a race condition // in React Native, so find a way to do this in a robust way. //TestCase.assertEqual(testObjects.length, 4); //TestCase.assertEqual(changes.insertions.length, 1); resolve(); });