new DeviceStateProvider()
Example
render() {
return (
<DeviceStateProvider>
<Application />
</DeviceStateProvider>
);
}
Render this component once (preferable as high up your tree as possible).
Use the withDeviceState HoC to provide the deviceState to your components.
Note: Usage of context is deprecated and will be removed in a future version!
render() {
return (
<DeviceStateProvider>
<Application />
</DeviceStateProvider>
);
}