<LightSensor>

Ues AmbientLightSensor API to privide lightning data.

Usage

import {LightSensor} from 'libreact/lib/LightSensor';

<LightSensor>{(light) =>
  JSON.stringify(light, null, 4)
}</LightSensor>

withLight() HOC

Higher order component that injects illumination prop into your component.

import {withLight} from 'libreact/lib/LightSensor';

const MyCompWithLight = withLight(MyComp);

@withLight HOC

Class decorator that injects illumination prop into your component.

import {withLight} from 'libreact/lib/LightSensor';

@withLight
class MyComp extends Component {

}

results matching ""

    No results matching ""