UNPKG

react-native-readium

Version:

A react-native wrapper for https://readium.org/

11 lines (10 loc) 390 B
import { UIManager } from 'react-native'; import { COMPONENT_NAME } from './COMPONENT_NAME'; export const createFragment = (viewId) => { if (viewId !== null) { UIManager.dispatchViewManagerCommand(viewId, // we are calling the 'create' command // @ts-ignore UIManager.getViewManagerConfig(COMPONENT_NAME).Commands.create.toString(), [viewId]); } };