AsyncStorage: Invariant Violation: Module AppRegistry is not a registered callable module

I was having a similiar issue. In order to use async custom language detector, you need to set async to true. Then you will receive callback function on detect().



const languageDetector: LanguageDetectorAsyncModule = {
  type: "languageDetector",
  async: true,
  // Since we set async to true, detect has now callback function...
  detect: async (callback: (lang: string) => void) => {
  const language = await AsyncStorage.getItem('language')
    callback(lastSelectedLang);
  },
  init: () => {},
  cacheUserLanguage: (lng: string) =>
    AsyncStorage.setItem('language', lng),
};