React Native Firebase Remote Config Update Event #4985
-
So I use remote config to load i18n translation data to my app and I initialise the i18n service on my app with the translation data on app load. The problem is that when the translation data is updated on firebase remote config. Users can't see the translation update because the i18n service need to be reinitialised thus means the app needs to be restarted. I think it would be helpful to have an event listener for when the remote config local cache is updated so that appropriate actions can be taken. I don't mind also hear workaround to achieving this real-time update. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The remote-config local values are only ever updated when the app specifically requests them using one of the fetch API variants. There is nothing to listen for as this is an explicit call you make directly, so you can then act on the results if they are updated. For that reason the native SDKs do not provide any listening capability at all, there is no API like this for us to expose. It seems your app needs to restructure it's control flow somehow. If you want the app to do something in response to a server-side change, you'll need to somehow tell the app to do that, from the server. I believe that is what FCM is for.
I believe that handles all your cases. |
Beta Was this translation helpful? Give feedback.
The remote-config local values are only ever updated when the app specifically requests them using one of the fetch API variants. There is nothing to listen for as this is an explicit call you make directly, so you can then act on the results if they are updated. For that reason the native SDKs do not provide any listening capability at all, there is no API like this for us to expose.
It seems your app needs to restructure it's control flow somehow. If you want the app to do something in response to a server-side change, you'll need to somehow tell the app to do that, from the server. I believe that is what FCM is for.