前端调用客户端ui组建()

/**
 * 使用 RN提供的
 */ 
import { NativeModules, requireNativeComponent } from 'react-native';

MMRCTDatePickerView =
  'MMRCTDatePickerView' in NativeModules.UIManager
    ? requireNativeComponent('MMRCTDatePickerView')
    : null;
    
 /**
 * 检查native是否支持supportDatePickerView
 */   
export const supportDatePickerView = () => {
  if (MMRCTDatePickerView) {
    return true;
  }
  return false;
};

 /**
 * render View
 */
return (
  <MMRCTDatePickerView
    style={props.style}
    data={paramStr}
    onItemSelected={(event: any) => {
      console.log('客户端时间返回=======', event?.nativeEvent?.result);
      onItemSelected && onItemSelected(event);
    }}
    value={value}
  />
);
————————
/**
 * 使用 RN提供的
 */ 
import { NativeModules, requireNativeComponent } from 'react-native';

MMRCTDatePickerView =
  'MMRCTDatePickerView' in NativeModules.UIManager
    ? requireNativeComponent('MMRCTDatePickerView')
    : null;
    
 /**
 * 检查native是否支持supportDatePickerView
 */   
export const supportDatePickerView = () => {
  if (MMRCTDatePickerView) {
    return true;
  }
  return false;
};

 /**
 * render View
 */
return (
  <MMRCTDatePickerView
    style={props.style}
    data={paramStr}
    onItemSelected={(event: any) => {
      console.log('客户端时间返回=======', event?.nativeEvent?.result);
      onItemSelected && onItemSelected(event);
    }}
    value={value}
  />
);