import React, {useEffect, useRef} from 'react';
import {
  PixelRatio,
  UIManager,
  findNodeHandle,
  StyleSheet
} from 'react-native';

import MyViewManager from './MyCustomView';

const createFragment = (viewId: any) =>
  UIManager.dispatchViewManagerCommand(
    viewId,
    // we are calling the 'create' command
    "1", [viewId],
  );
  
 const App = () => {
  const ref = useRef(null);

  useEffect(() => {
    const viewId = findNodeHandle(ref.current);
    createFragment(viewId);
  }, []);

  return (
    

   // <MyCustomView />
    <MyViewManager
  
      ref={ref}
    />
  );
};


export default App;