File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed
Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,34 @@ user's connected media devices.
66## Usage
77
88``` jsx
9- import {MediaDevicesSensor } from ' libreact/lib/MediaDevicesSensor ' ;
9+ import {MediaDeviceSensor } from ' libreact/lib/MediaDeviceSensor ' ;
1010
11- < MediaDevicesSensor > {(state ) =>
11+ < MediaDeviceSensor > {(state ) =>
1212 JSON .stringify (state, null , 4 )
1313}< / MediaDevicesSensor>
1414```
15+
16+
17+ ## ` withMediaDevices() `
18+
19+ Higher order component that injects ` devices ` prop into your component.
20+
21+ ``` js
22+ import {withMediaDevices } from ' libreact/lib/MediaDeviceSensor' ;
23+
24+ const MyCompDevices = withMediaDevices (MyComp);
25+ ```
26+
27+
28+ ## ` @withMediaDevices `
29+
30+ Statefull component class decorator that injects ` devices ` prop into your component.
31+
32+ ``` js
33+ import {withMediaDevices } from ' libreact/lib/MediaDeviceSensor' ;
34+
35+ @withMediaDevices
36+ class MyComp extends Component {
37+
38+ }
39+ ```
You can’t perform that action at this time.
0 commit comments