ReactNativeLocalization
ReactNativeLocalization copied to clipboard
A WeakMap cannot have a non-object key
Hello,
When the Live reload and Hot reloading are enabled on my virtual device I get the error A WeakMap cannot have a non-object key.
This error occur when I save a file where I've imported and used my Translation service or when I save my translation json.
Here is the error screen:

The File with translations:
import LocalizedStrings from 'react-native-localization';
let Translate = new LocalizedStrings({
en:{
// Errors
errorNetworkRequest: 'An error occurred while making a network request',
...
},
it: {
...
}
});
export default Translate;
Then I import my translation file with import Translate from 'MyProject/src/lib/utils/Translate'; or user it from props
Thanks in advance
Have you created the app using create-react-native-app?
Because from the screenshot it seems so... and
Because you don't build any native code when using Create React Native App to create a project, it's not possible to include custom native modules beyond the React Native APIs and components that are available in the Expo client app.