Skip to content

Instantly share code, notes, and snippets.

@troZee
Last active June 3, 2019 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troZee/f72a6097efa3d964beb17dd1c100d30c to your computer and use it in GitHub Desktop.
Save troZee/f72a6097efa3d964beb17dd1c100d30c to your computer and use it in GitHub Desktop.
class MyNativeView extends React.Component<Props> {
goToNextPage = () => {
UIManager.dispatchViewManagerCommand(
ReactNative.findNodeHandle(this),
UIManager.getViewManagerConfig('RNCMyNativeView').Commands.goToNextPage,
[]
);
};
goToPreviousPage = () => {
UIManager.dispatchViewManagerCommand(
ReactNative.findNodeHandle(this),
UIManager.getViewManagerConfig('RNCMyNativeView').Commands.goToPreviousPage,
[]
);
};
render() {
return <NativeComponent ref={NATIVE_COMPONENT_REF} />;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment