realm-js

UI doesn't update until tap on the screen when setState is called inside a realm listener callback

不问归期 提交于 2019-12-08 16:49:06
问题 UPDATED DESCRIPTION I have a listener on a Realm Object for getting updates. When there is an update on the server (or in the client) the function provided to the listener calls setState({}). The strange part is that even if the console says that everything is ok, and it shows that the render method was called with correct data, I can't see any updates to my app. If I tap on the screen randomly (after 1s,2s, 20s...) the UI magically updates and everything is correct. If I do the same setState