JSPM

  • Created
  • Published
  • Downloads 91
  • Score
    100M100P100Q116095F
  • License MIT

camera

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@unif/react-native-camera) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @unif/react-native-camera

    camera

    Installation

    npm install @unif/react-native-camera

    ###or

    yarn add @unif/react-native-camera

    Usage

    import  React from 'react';
    
    import { useCamera } from '@unif/react-native-camera';
    
    
    const App = ()=>{
        const [api,holder]=useCamera()
        return <View>
                    <Text onPress={async()=>{
                    const res = await api.open({
                        cameraMode: [{ mode: 'single' }, { mode: 'continuous' }],
                        dataRetainedMode: 'clear',
                    });
                    }}>打开</Text>
                {holder}
        </View>
    }