rc-target-size
Version:
a tool help get size of element for React, support higher-order component and component render.
21 lines (15 loc) • 357 B
JavaScript
/* eslint-disable */
import React from 'react'
import { targetSize } from 'rc-target-size'
const ResizeOfMeWrapped = ({ width, height }) => (
<div style={{ height: 100 }}>
hoc - size of me: {width}x{height}
</div>
)
const ResizeOfMe = targetSize()(ResizeOfMeWrapped)
const App = () => (
<div>
<ResizeOfMe />
</div>
)
export default App