Open
Description
If you use Dimensions
to wrap a stateless functional component it complains but still seems to work.
const SomebodyCaresAboutDimensions = ({containerWidth} => (
<div>
width: {containerWidth}
</div>
));
export default Dimensions()(SomebodyCaresAboutDimensions);
will give
Warning: Stateless function components cannot be given refs (See ref "wrappedInstance" in SomebodyCaresAboutDimensions created by DimensionsHOC). Attempts to access this ref will fail.