Closed Akashdeep312 closed 1 year ago
Hi @Akashdeep312,
This repository is not for the package you are using. This repo is for the @meteorrn/core
and other @meteorrn
org packages only.
Highly recommend switching to this package as it is officially recognized and well maintained.
Closing this issue for now
HI @TheRealNate i've recently switched to @meteorrn/core and to some extent it solves the problem now app is not stuck on white screen , But now white screen appears only for 1 sec and then user is navigated to home screen. It appears like the app when app is disconnected and reconnects with the server then app goes to home screen
React Native and meterorn/core versions:
"react": "16.13.1",
"react-native": "0.63.4",
"@meteorrn/core": "^2.3.0",
And now i'm not getting any logs as i described earlier
Hi @Akashdeep312, sorry for not getting back to you sooner. For future reference, I recommend reopening the issue if you need to continue the conversation as it can get it attention quicker.
The app can disconnect and reconnect if the websocket connection fails. For example, depending on device if the user has the app in the background for a while the websocket connection will be closed, then when the app is refocused the connection needs to be reopened again. I’d look into your logic for when you are loading the home screen (are you waiting for Meteor connection, login, etc).
Also keep in mind there will be a very short delay with any React Native app (I’m not sure if what you are referring to is this short delay or a longer delay as a result of an unexpected issue). You can mitigate this by implementing a splash screen like mentioned in this article.
I’m going to reopen the issue for now in case you need to continue the conversation. If you need to follow up feel free, otherwise if you feel your issue is solved you can close this.
hi @TheRealNate i've come across a behaviour of meteor connection , so what happens is when i put app in background and start working on other app after a while when i came back to my app the Meteor.user() returns undefined , so tackle this for the time being i've just handled it like making it a state variable and made a use effect once it changes its state and updates it's value if it's not undefined.
Have this is a desired behaviour of connection or that's how it works , if yes then i'm better off handling Meteor.user() with a separate context and pass it throughout the app and update once listen to any changes. Or can you suggest any better way to handle this
Hi @Akashdeep312, this is expected behavior. This package provides no data persistence, so if the connection to the server is lost we assume the data is stale and clear it. Keeping the data in state (for temporary persistence) or local storage (for semi-permanent persistence) is likely the best way to handle this.
Closing this issue due to no activity. Feel free to reopen.
Steps to reproduce :
While app is working suddenly a white screen appears.
React Native and MeteorRN versions:
in the console i got some logs like