We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ff53e6 commit 69b8f01Copy full SHA for 69b8f01
README.md
@@ -18,6 +18,31 @@ Install it with
18
npm install react-resize-aware --save
19
```
20
21
+# Usage
22
+
23
+```jsx
24
+import React, { Component } from 'react'
25
+import { findDOMNode } from 'react-dom'
26
+import ResizeAware from 'react-resize-aware'
27
28
+export default class FooBar extends Component {
29
+ render() {
30
+ return (
31
+ <ResizeWare ref='container'>
32
+ Hello, World!
33
+ </ResizeAware>
34
+ )
35
+ }
36
37
+ componentDidMount() {
38
+ findDOMNode(this.refs.container).addEventListener((evt) => {
39
+ console.log('Component has been resized!')
40
+ })
41
42
+}
43
+```
44
45
46
# License
47
48
MIT License
0 commit comments