UNPKG

react-context

Version:
11 lines (9 loc) 195 B
--- id: contexts-width title: Width --- ``` this.context.width // number Component.contextTypes = context.subscribe(['width']) ``` Sets a resize listener and returns the width of the viewport.