FaCC that works similar to <SizeSensor> but re-renders only on width change.
Use it as FaCC
import {WidthSensor} from 'libreact/lib/WidthSensor';
<WidthSensor>{({width, height}) =>
`WIDTH: ${width}, HEIGHT: ${height}`
}</WidthSensor>Or use onWidth prop
import {WidthSensor} from 'libreact/lib/WidthSensor';
<WidthSensor onWidth={({width, height}) => console.log(width, height)}>
Resize me!
</WidthSensor>Works same as withSize() and @withSize.
Incldue withWidth as follows
import {withWidth} from 'libreact/lib/WidthSensor';