File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @alitajs/hooks" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "description" : " Awesome react hooks" ,
55 "main" : " dist/index.js" ,
66 "module" : " dist/index.esm.js" ,
Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ React 状态钩子,用户动态获取 窗口 resize 后的值。
2929 return (
3030 <Fragment >
3131 <Descriptions bordered title = " 窗口resize动态变化" >
32- <Descriptions.Item label = " height" >{ windowSize .height } </Descriptions.Item >
33- <Descriptions.Item label = " width" >{ windowSize .width } </Descriptions.Item >
32+ <Descriptions.Item label = " height" >
33+ { windowSize .height }
34+ </Descriptions.Item >
35+ <Descriptions.Item label = " width" >
36+ { windowSize .width }
37+ </Descriptions.Item >
3438 </Descriptions >
3539 </Fragment >
3640 )}, [windowSize ])
@@ -50,9 +54,9 @@ React 状态钩子,用户动态获取 窗口 resize 后的值。
5054## API
5155
5256```
53- const windowSize = useWindowSize({waitTime: 500});
57+ const windowSize = useWindowSize({ waitTime: 500 });
5458
55- params: { waitTime?: number}
59+ params: { waitTime?: number }
5660```
5761
5862## 结果
You can’t perform that action at this time.
0 commit comments