@folklore/hooks 0.0.82 → 0.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs.js CHANGED
@@ -1087,7 +1087,7 @@ function useWindowSize({
1087
1087
  onMount = false,
1088
1088
  memo = false
1089
1089
  } = {}) {
1090
- const [size, setSize] = react.useState(onMount ? getWindowSize() : {
1090
+ const [size, setSize] = react.useState(() => onMount ? getWindowSize() : {
1091
1091
  width: 0,
1092
1092
  height: 0
1093
1093
  });
@@ -1897,7 +1897,7 @@ function useWindowScroll({
1897
1897
  onMount = false,
1898
1898
  memo = false
1899
1899
  } = {}) {
1900
- const [scroll, setScroll] = react.useState(onMount ? getWindowScroll() : {
1900
+ const [scroll, setScroll] = react.useState(() => onMount ? getWindowScroll() : {
1901
1901
  x: 0,
1902
1902
  y: 0
1903
1903
  });
package/dist/es.js CHANGED
@@ -1085,7 +1085,7 @@ function useWindowSize({
1085
1085
  onMount = false,
1086
1086
  memo = false
1087
1087
  } = {}) {
1088
- const [size, setSize] = useState(onMount ? getWindowSize() : {
1088
+ const [size, setSize] = useState(() => onMount ? getWindowSize() : {
1089
1089
  width: 0,
1090
1090
  height: 0
1091
1091
  });
@@ -1895,7 +1895,7 @@ function useWindowScroll({
1895
1895
  onMount = false,
1896
1896
  memo = false
1897
1897
  } = {}) {
1898
- const [scroll, setScroll] = useState(onMount ? getWindowScroll() : {
1898
+ const [scroll, setScroll] = useState(() => onMount ? getWindowScroll() : {
1899
1899
  x: 0,
1900
1900
  y: 0
1901
1901
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@folklore/hooks",
3
- "version": "0.0.82",
3
+ "version": "0.0.83",
4
4
  "description": "React hooks",
5
5
  "keywords": [
6
6
  "javascript",
@@ -49,7 +49,7 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "565254f67e63bf9f1ccb4ef925633af37682e44d",
52
+ "gitHead": "81b41a4e0ac8ae61d302f97611771b1613a904c7",
53
53
  "dependencies": {
54
54
  "@folklore/events": "^0.0.10",
55
55
  "@folklore/services": "^0.1.44",