I was trying to implement localisation in my react native app. But, I need help with one issue.

I am using following code to change my app language.

LangManager.js class

```
import * as RNLocalize from 'react-native-localize';
import i18n from 'i18n-js';
import memoize from 'lodash.memoize';
import en from './locales/en.js';
import nl from './locales/nl.js';

export const translate = memoize((key, config) => i18n.t(key, config));

export const setI18nConfig = lang => {
  // fallback if no available language fits
  const fallback = { languageTag: 'en', isRTL: false };

  // clear translation cache
  translate.cache.clear();
  // update layout directio
  // set i18n-js config
  i18n.translations = { en, nl };
  i18n.locale = lang;
};

export const changeLanguage = async lang => {
  setI18nConfig(lang);
  // AsyncStorage.setItem('language', lang);
};

export const isRTL = () => {
  return translate('lang') === 'ar' ? true : false;
};

```

To use in my screen, HomeScreen.js I am using following code.

```
import React from 'react';
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { translate, changeLanguage } from '../lang_manager/LangManager';

const HomeScreen = () => {
    return (
        <View style={styles.container}>
            <Text>{translate('hello')}</Text>
            <Text>{translate('goodMorning')}</Text>
            <Text>{translate('currency')}</Text>
            <TouchableOpacity style={{ margin: 16, padding: 16, backgroundColor: 'blue' }}
                onPress={() => {
                    let count = Math.floor((Math.random() * 2));
                    if (count % 2 == 0) {
                        console.log("en : ", count);
                        changeLanguage('en');
                    } else {
                        console.log("nl : ", count);
                        changeLanguage('nl');
                    }
                }}>
                <Text>Change Language</Text>
            </TouchableOpacity>
        </View>
    );
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center'
    }
});

export default HomeScreen;

```

But, whenever i change my language from 'en' to 'nl' or vice versa it doesn't take effet immidiately. I need to close and start my app again to take effect or maybe setstate.

So is there any better way to update app language change take effect immidiately?

Thanks.