@sfenton/react-native-readium-with-cfi
Version:
A react-native wrapper for https://readium.org/ with CFI support
11 lines (10 loc) • 390 B
JavaScript
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]);
}
};