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 11# CHANGELOG
22
3- ## 3.2 .0
3+ ## 4.0 .0
44
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
712
813## 3.1.0
914
1015- Added Typescript types
1116
1217## 3.0.0
1318
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
1621
1722## 2.0.1
1823
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
1111
1212## Install
1313
14- ```
14+ ``` sh
1515yarn add use-resize-observer
1616# or
1717npm install --save use-resize-observer
@@ -36,15 +36,16 @@ const App = () => {
3636
3737## SSR, Default Size
3838
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.
4040
4141``` js
4242const [ref , width , height ] = useResizeObserver ({
4343 defaultWidth: 100 ,
4444 defaultHeight: 50
4545});
4646
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.
4849```
4950
5051## Notes
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
22 "name" : " use-resize-observer" ,
3- "version" : " 3.2 .0" ,
3+ "version" : " 4.0 .0" ,
44 "main" : " dist/bundle.cjs.js" ,
55 "module" : " dist/bundle.esm.js" ,
66 "repository" :
" [email protected] :ZeeCoder/use-resize-observer.git" ,
3838 "@babel/preset-env" : " ^7.1.0" ,
3939 "babel-regenerator-runtime" : " ^6.5.0" ,
4040 "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" ,
4444 "karma-jasmine" : " ^2.0.1" ,
4545 "karma-spec-reporter" : " ^0.0.32" ,
46- "lint-staged" : " ^7.3 .0" ,
46+ "lint-staged" : " ^9.2 .0" ,
4747 "parcel-bundler" : " ^1.10.3" ,
4848 "prettier" : " ^1.14.3" ,
4949 "react" : " ^16.8.1" ,
5050 "react-dom" : " ^16.8.1" ,
51- "rollup" : " ^0.66.6 " ,
51+ "rollup" : " ^1.17.0 " ,
5252 "rollup-plugin-babel" : " ^4.0.3"
53- },
54- "types" : " index.d.ts"
53+ }
5554}
You can’t perform that action at this time.
0 commit comments