How to use the @unimodules/core.requireNativeViewManager function in @unimodules/core

To help you get started, we’ve selected a few @unimodules/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / packages / expo-ads-facebook / src / AdIconView.tsx View on Github external
export default class AdIconView extends React.Component<Props> {
  render() {
    return (
      <AdIconViewContext.Consumer>
        {(contextValue: AdIconViewContextValue | null) => {
          let context = nullthrows(contextValue);
          return <NativeAdIconView {...this.props} ref={context.nativeRef} />;
        }}
      </AdIconViewContext.Consumer>
    );
  }
}

// The native AdIconView has the same props as regular View
export type NativeAdIconView = React.Component<Props>;
export const NativeAdIconView = requireNativeViewManager('AdIconView');
github expo / expo / packages / expo-linear-gradient / build / NativeLinearGradient.ios.js View on Github external
import React from 'react';
import { requireNativeViewManager } from '@unimodules/core';
export default class NativeLinearGradient extends React.PureComponent {
    render() {
        return <BaseNativeLinearGradient {...this.props}/>;
    }
}
const BaseNativeLinearGradient = requireNativeViewManager('ExpoLinearGradient');
//# sourceMappingURL=NativeLinearGradient.ios.js.map
github expo / expo / packages / expo-ads-facebook / build / AdMediaView.js View on Github external
import nullthrows from 'nullthrows';
import React from 'react';
import { requireNativeViewManager } from '@unimodules/core';
import { AdMediaViewContext } from './withNativeAd';
export default class AdMediaView extends React.Component {
    render() {
        return (<AdMediaViewContext.Consumer>
        {(contextValue) => {
            let context = nullthrows(contextValue);
            return <NativeAdMediaView {...this.props} ref={context.nativeRef}/>;
        }}
      </AdMediaViewContext.Consumer>);
    }
}
export const NativeAdMediaView = requireNativeViewManager('MediaView');
//# sourceMappingURL=AdMediaView.js.map
github expo / expo / packages / expo-camera / src / ExponentCamera.ts View on Github external
import { requireNativeViewManager } from '@unimodules/core';
import * as React from 'react';
import { NativeProps } from './Camera.types';

const ExponentCamera: React.ComponentType<NativeProps> = requireNativeViewManager('ExponentCamera');

export default ExponentCamera;
github expo / expo / packages / expo-linear-gradient / src / NativeLinearGradient.android.tsx View on Github external
<View {...props} style={style}>
        <BaseNativeLinearGradient
          style={{ position: 'absolute', top: 0, left: 0, bottom: 0, right: 0 }}
          colors={colors}
          startPoint={startPoint}
          endPoint={endPoint}
          locations={locations}
          borderRadii={borderRadiiPerCorner}
        />
        {children}
      </View>
    );
  }
}

const BaseNativeLinearGradient = requireNativeViewManager('ExpoLinearGradient');
github expo / expo / packages / expo-ads-admob / build / PublisherBanner.js View on Github external
'smartBannerPortrait',
        'smartBannerLandscape',
    ]),
    adUnitID: PropTypes.string,
    testDeviceID: PropTypes.string,
    onAdViewDidReceiveAd: PropTypes.func,
    onDidFailToReceiveAdWithError: PropTypes.func,
    onAdViewWillPresentScreen: PropTypes.func,
    onAdViewWillDismissScreen: PropTypes.func,
    onAdViewDidDismissScreen: PropTypes.func,
    onAdViewWillLeaveApplication: PropTypes.func,
    onAdmobDispatchAppEvent: PropTypes.func,
    ...ViewPropTypes,
};
PublisherBanner.defaultProps = { bannerSize: 'smartBannerPortrait' };
const ExpoBannerView = requireNativeViewManager('ExpoAdsPublisherBannerView');
//# sourceMappingURL=PublisherBanner.js.map
github expo / expo / packages / expo-linear-gradient / src / NativeLinearGradient.ios.tsx View on Github external
type Props = {
  colors: number[];
  locations?: number[] | null;
  startPoint?: Point | null;
  endPoint?: Point | null;
} & React.ComponentProps<typeof View>;

type Point = [number, number];

export default class NativeLinearGradient extends React.PureComponent<Props> {
  render() {
    return <BaseNativeLinearGradient {...this.props} />;
  }
}

const BaseNativeLinearGradient = requireNativeViewManager('ExpoLinearGradient');
github expo / expo / packages / expo-ads-facebook / build / AdOptionsView.js View on Github external
};
        return (<AdOptionsViewContext.Consumer>
        {(contextValue) => {
            let adViewRef = nullthrows(contextValue && contextValue.nativeAdViewRef);
            return (<NativeAdOptionsView {...this.props} style={[this.props.style, style]} nativeAdViewTag={findNodeHandle(adViewRef.current)} orientation={this.shouldAlignHorizontal()
                ? NativeOrientation.Horizontal
                : NativeOrientation.Vertical}/>);
        }}
      </AdOptionsViewContext.Consumer>);
    }
}
AdOptionsView.defaultProps = {
    iconSize: 23,
    orientation: 'horizontal',
};
export const NativeAdOptionsView = requireNativeViewManager('AdOptionsView');
//# sourceMappingURL=AdOptionsView.js.map
github expo / expo / packages / expo-av / build / ExponentVideo.js View on Github external
import { requireNativeViewManager } from '@unimodules/core';
export default requireNativeViewManager('ExpoVideoView');
//# sourceMappingURL=ExponentVideo.js.map
github expo / expo / packages / expo-camera / build / ExponentCamera.js View on Github external
import { requireNativeViewManager } from '@unimodules/core';
const ExponentCamera = requireNativeViewManager('ExponentCamera');
export default ExponentCamera;
//# sourceMappingURL=ExponentCamera.js.map