Skip to content

Instantly share code, notes, and snippets.

@naqvitalha
Last active November 30, 2020 13:59
Show Gist options
  • Save naqvitalha/841c7253af77ce9a89d5d9ac3b11c354 to your computer and use it in GitHub Desktop.
Save naqvitalha/841c7253af77ce9a89d5d9ac3b11c354 to your computer and use it in GitHub Desktop.
Native modules on web
import { NativeModules } from 'react-native';
//resolves to the web version when relevant, reduces the need of .web.ts files
NativeModules.Toast.show('hello');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment