setState doesn't update UI when called inside listener callback


#1

Hi guys, I have a problem with realm-js.

I posted a question on StackOverflow, but even if I added a bounty ( for what is worth :sweat_smile::sweat_smile:) I haven’t received any answers. After some days of testing, I ended up thinking that the problem might be related to realm.

Briefly, the problem is that setState() called in a listener callback doesn’t update the UI properly. In fact, after setState, the render method run well and the data is up to date but the ui (DOM?) is not updated until I do something else (running an animation, tap on the screen )

If I debug js remotely, the problem disappears (can’t say why)

Here the stackOverflown question:

Thanks for reading.


#2

UPDATED QUESTION on StackOverflow