Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6213

Using Async Storage for Localization

$
0
0

I have 2 different APIs that I use for localization. These return json.

getEnLoc() //400kbgetEsLoc() //400kb

I want to call them on App.ts while the app is being ready for running and write the returned answer(json object) to async storage. Afterwards, while the any page is being translated, the key-values ​​in the local storage will be checked.

// In App.tsAsyncStorage.setItem('@storage_Key', getEnLoc())// In Home.tsxconst jsonValue = await AsyncStorage.getItem('@storage_Key')

What do you think about this logic? Do you think it causes loss of performance?


Viewing all articles
Browse latest Browse all 6213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>