File tree Expand file tree Collapse file tree 5 files changed +2237
-1995
lines changed Expand file tree Collapse file tree 5 files changed +2237
-1995
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
- ## 3.2 .0
3
+ ## 4.0 .0
4
4
5
- - Added option to pass default width and height. (Useful when using this plugin
6
- on the SSR side.)
5
+ - Added option to pass default width and height. Useful when using the lib with
6
+ SSR.
7
+ - Dep upgrades
8
+ - ** [ BREAKING] ** Removed TS types. See:
9
+ - https://github.com/ZeeCoder/use-resize-observer/issues/12
10
+ - https://github.com/ZeeCoder/use-resize-observer/pull/13
11
+ - https://github.com/ZeeCoder/use-resize-observer/pull/8
7
12
8
13
## 3.1.0
9
14
10
15
- Added Typescript types
11
16
12
17
## 3.0.0
13
18
14
- - ** [ BREAKING] ** Requires React 16.8.0 or above, which is the first non-alpha release
15
- that includes hooks
19
+ - ** [ BREAKING] ** Requires React 16.8.0 or above, which is the first non-alpha
20
+ release that includes hooks
16
21
17
22
## 2.0.1
18
23
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ A React hook that allows you to use a ResizeObserver to measure an element's siz
11
11
12
12
## Install
13
13
14
- ```
14
+ ``` sh
15
15
yarn add use-resize-observer
16
16
# or
17
17
npm install --save use-resize-observer
@@ -36,15 +36,16 @@ const App = () => {
36
36
37
37
## SSR, Default Size
38
38
39
- You can set the default custom size, which is useful for SSR.
39
+ You can set the default size, which is useful for SSR.
40
40
41
41
``` js
42
42
const [ref , width , height ] = useResizeObserver ({
43
43
defaultWidth: 100 ,
44
44
defaultHeight: 50
45
45
});
46
46
47
- // width / height will be 100 and 50 respectively, until the ResizeObserver kicks in.
47
+ // width / height will be 100 and 50 respectively, until the ResizeObserver
48
+ // kicks in and reports the actual size.
48
49
```
49
50
50
51
## Notes
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " use-resize-observer" ,
3
- "version" : " 3.2 .0" ,
3
+ "version" : " 4.0 .0" ,
4
4
"main" : " dist/bundle.cjs.js" ,
5
5
"module" : " dist/bundle.esm.js" ,
6
6
"repository" :
" [email protected] :ZeeCoder/use-resize-observer.git" ,
38
38
"@babel/preset-env" : " ^7.1.0" ,
39
39
"babel-regenerator-runtime" : " ^6.5.0" ,
40
40
"delay" : " ^4.1.0" ,
41
- "husky" : " ^1.1.2 " ,
42
- "karma" : " ^3.1.3 " ,
43
- "karma-chrome-launcher" : " ^2.2 .0" ,
41
+ "husky" : " ^3.0.1 " ,
42
+ "karma" : " ^4.2.0 " ,
43
+ "karma-chrome-launcher" : " ^3.0 .0" ,
44
44
"karma-jasmine" : " ^2.0.1" ,
45
45
"karma-spec-reporter" : " ^0.0.32" ,
46
- "lint-staged" : " ^7.3 .0" ,
46
+ "lint-staged" : " ^9.2 .0" ,
47
47
"parcel-bundler" : " ^1.10.3" ,
48
48
"prettier" : " ^1.14.3" ,
49
49
"react" : " ^16.8.1" ,
50
50
"react-dom" : " ^16.8.1" ,
51
- "rollup" : " ^0.66.6 " ,
51
+ "rollup" : " ^1.17.0 " ,
52
52
"rollup-plugin-babel" : " ^4.0.3"
53
- },
54
- "types" : " index.d.ts"
53
+ }
55
54
}
You can’t perform that action at this time.
0 commit comments