You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The create-react-native-library tool instantiates modules in JavaScript with code that looks like this:
import { NativeModules, Platform } from 'react-native';
const LINKING_ERROR =
`The package 'foo' doesn't seem to be linked. Make sure: \n\n` +
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
'- You rebuilt the app after installing the package\n' +
'- You are not using Expo Go\n';
const Foo = NativeModules.Foo
? NativeModules.Foo
: new Proxy(
{},
{
get() {
throw new Error(LINKING_ERROR);
},
}
);
If the module is not linked for some reason, this produces a nice error message. With the toolkit, the generated Typescript code simply tries to dereference the undefined module, which results in much less clear errors like:
Cannot read property 'unsubscribeFromToolkitUseFlow' of null
The text was updated successfully, but these errors were encountered:
The
create-react-native-library
tool instantiates modules in JavaScript with code that looks like this:If the module is not linked for some reason, this produces a nice error message. With the toolkit, the generated Typescript code simply tries to dereference the undefined module, which results in much less clear errors like:
Cannot read property 'unsubscribeFromToolkitUseFlow' of null
The text was updated successfully, but these errors were encountered: