react-simplikit 0.0.48 → 0.0.50

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.
Files changed (63) hide show
  1. package/dist/components/ImpressionArea/index.cjs +7 -4
  2. package/dist/components/ImpressionArea/index.d.cts +1 -1
  3. package/dist/components/Separated/index.cjs +1 -1
  4. package/dist/hooks/useCallbackOncePerRender/index.cjs +6 -3
  5. package/dist/hooks/useCounter/index.cjs +12 -14
  6. package/dist/hooks/useDebounce/index.cjs +14 -8
  7. package/dist/hooks/useDebouncedCallback/index.cjs +7 -4
  8. package/dist/hooks/useDoubleClick/index.cjs +6 -3
  9. package/dist/hooks/useImpressionRef/index.cjs +7 -4
  10. package/dist/hooks/useIntersectionObserver/index.cjs +6 -3
  11. package/dist/hooks/useInterval/index.cjs +24 -15
  12. package/dist/hooks/useIsClient/index.cjs +40 -0
  13. package/dist/hooks/useIsClient/index.d.cts +40 -0
  14. package/dist/hooks/useList/index.cjs +104 -0
  15. package/dist/hooks/useList/index.d.cts +50 -0
  16. package/dist/hooks/useLoading/index.cjs +9 -6
  17. package/dist/hooks/useLongPress/index.cjs +6 -3
  18. package/dist/hooks/useOutsideClickEffect/index.cjs +6 -3
  19. package/dist/hooks/usePreservedCallback/index.cjs +6 -3
  20. package/dist/hooks/usePrevious/index.d.cts +3 -3
  21. package/dist/hooks/useRefEffect/index.cjs +6 -3
  22. package/dist/hooks/useRefEffect/index.d.cts +3 -3
  23. package/dist/hooks/useSet/index.cjs +105 -0
  24. package/dist/hooks/useSet/index.d.cts +39 -0
  25. package/dist/hooks/useThrottle/index.cjs +6 -3
  26. package/dist/hooks/useThrottledCallback/index.cjs +172 -0
  27. package/dist/hooks/useThrottledCallback/index.d.cts +30 -0
  28. package/dist/hooks/useTimeout/index.cjs +8 -5
  29. package/dist/hooks/useTimeout/index.d.cts +1 -1
  30. package/dist/index.cjs +264 -110
  31. package/dist/index.d.cts +4 -0
  32. package/esm/components/ImpressionArea/index.d.ts +1 -1
  33. package/esm/components/ImpressionArea/index.js +7 -4
  34. package/esm/components/Separated/index.js +1 -1
  35. package/esm/hooks/useCallbackOncePerRender/index.js +6 -3
  36. package/esm/hooks/useCounter/index.js +12 -14
  37. package/esm/hooks/useDebounce/index.js +14 -8
  38. package/esm/hooks/useDebouncedCallback/index.js +7 -4
  39. package/esm/hooks/useDoubleClick/index.js +6 -3
  40. package/esm/hooks/useImpressionRef/index.js +7 -4
  41. package/esm/hooks/useIntersectionObserver/index.js +6 -3
  42. package/esm/hooks/useInterval/index.js +24 -15
  43. package/esm/hooks/useIsClient/index.d.ts +40 -0
  44. package/esm/hooks/useIsClient/index.js +14 -0
  45. package/esm/hooks/useList/index.d.ts +50 -0
  46. package/esm/hooks/useList/index.js +78 -0
  47. package/esm/hooks/useLoading/index.js +9 -6
  48. package/esm/hooks/useLongPress/index.js +6 -3
  49. package/esm/hooks/useOutsideClickEffect/index.js +6 -3
  50. package/esm/hooks/usePreservedCallback/index.js +6 -3
  51. package/esm/hooks/usePrevious/index.d.ts +3 -3
  52. package/esm/hooks/useRefEffect/index.d.ts +3 -3
  53. package/esm/hooks/useRefEffect/index.js +6 -3
  54. package/esm/hooks/useSet/index.d.ts +39 -0
  55. package/esm/hooks/useSet/index.js +79 -0
  56. package/esm/hooks/useThrottle/index.js +6 -3
  57. package/esm/hooks/useThrottledCallback/index.d.ts +30 -0
  58. package/esm/hooks/useThrottledCallback/index.js +146 -0
  59. package/esm/hooks/useTimeout/index.d.ts +1 -1
  60. package/esm/hooks/useTimeout/index.js +8 -5
  61. package/esm/index.d.ts +4 -0
  62. package/esm/index.js +234 -84
  63. package/package.json +1 -1
package/esm/index.js CHANGED
@@ -66,9 +66,12 @@ function debounce(func, debounceMs, { edges = ["leading", "trailing"] } = {}) {
66
66
  import { useCallback, useEffect, useRef } from "react";
67
67
  function usePreservedCallback(callback) {
68
68
  const callbackRef = useRef(callback);
69
- useEffect(() => {
70
- callbackRef.current = callback;
71
- }, [callback]);
69
+ useEffect(
70
+ function syncCallbackRef() {
71
+ callbackRef.current = callback;
72
+ },
73
+ [callback]
74
+ );
72
75
  return useCallback((...args) => {
73
76
  return callbackRef.current(...args);
74
77
  }, []);
@@ -84,7 +87,7 @@ function useDebouncedCallback({
84
87
  const handleChange = usePreservedCallback(onChange);
85
88
  const ref = useRef2({ value: false, clearPreviousDebounce: () => {
86
89
  } });
87
- useEffect2(() => {
90
+ useEffect2(function clearDebouncedOnUnmount() {
88
91
  const current = ref.current;
89
92
  return () => {
90
93
  current.clearPreviousDebounce();
@@ -270,7 +273,7 @@ function Separated({ children, by: separator }) {
270
273
  return /* @__PURE__ */ jsx2(Fragment2, { children: childrenArray.map((child, i, { length }) => /* @__PURE__ */ jsxs(Fragment, { children: [
271
274
  child,
272
275
  i + 1 !== length && separator
273
- ] }, i)) });
276
+ ] }, child.key ?? i)) });
274
277
  }
275
278
 
276
279
  // src/components/SwitchCase/SwitchCase.tsx
@@ -375,27 +378,25 @@ function isSetStateAction(next) {
375
378
 
376
379
  // src/hooks/useCounter/useCounter.ts
377
380
  import { useCallback as useCallback8, useState as useState3 } from "react";
381
+ var validateValue = (value, { min, max }) => {
382
+ if (min !== void 0 && value < min) {
383
+ return min;
384
+ }
385
+ if (max !== void 0 && value > max) {
386
+ return max;
387
+ }
388
+ return value;
389
+ };
378
390
  function useCounter(initialValue = 0, { min, max, step = 1 } = {}) {
379
- const validateValue = (value) => {
380
- let validatedValue = value;
381
- if (min !== void 0 && validatedValue < min) {
382
- validatedValue = min;
383
- }
384
- if (max !== void 0 && validatedValue > max) {
385
- validatedValue = max;
386
- }
387
- return validatedValue;
388
- };
389
- const [count, setCountState] = useState3(() => validateValue(initialValue));
390
- const validateValueMemoized = useCallback8(validateValue, [min, max]);
391
+ const [count, setCountState] = useState3(() => validateValue(initialValue, { min, max }));
391
392
  const setCount = useCallback8(
392
393
  (value) => {
393
394
  setCountState((prev) => {
394
395
  const nextValue = typeof value === "function" ? value(prev) : value;
395
- return validateValueMemoized(nextValue);
396
+ return validateValue(nextValue, { min, max });
396
397
  });
397
398
  },
398
- [validateValueMemoized]
399
+ [min, max]
399
400
  );
400
401
  const increment = useCallback8(() => {
401
402
  setCount((prev) => prev + step);
@@ -434,11 +435,14 @@ function useDebounce(callback, wait, options = {}) {
434
435
  const debounced = useMemo3(() => {
435
436
  return debounce(preservedCallback, wait, { edges });
436
437
  }, [preservedCallback, wait, edges]);
437
- useEffect7(() => {
438
- return () => {
439
- debounced.cancel();
440
- };
441
- }, [debounced]);
438
+ useEffect7(
439
+ function cancelDebouncedOnUnmount() {
440
+ return () => {
441
+ debounced.cancel();
442
+ };
443
+ },
444
+ [debounced]
445
+ );
442
446
  return debounced;
443
447
  }
444
448
 
@@ -621,29 +625,104 @@ function useInterval(callback, options) {
621
625
  const immediate = typeof options === "number" ? false : options.immediate;
622
626
  const enabled = typeof options === "number" ? true : options.enabled ?? true;
623
627
  const preservedCallback = usePreservedCallback(callback);
624
- useEffect10(() => {
625
- if (immediate === true && enabled) {
626
- preservedCallback();
627
- }
628
- }, [immediate, preservedCallback, enabled]);
629
- useEffect10(() => {
630
- if (!enabled) {
631
- return;
632
- }
633
- const id = window.setInterval(preservedCallback, delay);
634
- return () => window.clearInterval(id);
635
- }, [delay, preservedCallback, enabled]);
628
+ useEffect10(
629
+ function runImmediateCallback() {
630
+ if (immediate === true && enabled) {
631
+ preservedCallback();
632
+ }
633
+ },
634
+ [immediate, preservedCallback, enabled]
635
+ );
636
+ useEffect10(
637
+ function startInterval() {
638
+ if (!enabled) {
639
+ return;
640
+ }
641
+ const id = setInterval(preservedCallback, delay);
642
+ return () => clearInterval(id);
643
+ },
644
+ [delay, preservedCallback, enabled]
645
+ );
646
+ }
647
+
648
+ // src/hooks/useIsClient/useIsClient.ts
649
+ import { useEffect as useEffect11, useState as useState6 } from "react";
650
+ function useIsClient() {
651
+ const [isClient, setIsClient] = useState6(false);
652
+ useEffect11(function syncClientState() {
653
+ setIsClient(true);
654
+ }, []);
655
+ return isClient;
636
656
  }
637
657
 
638
658
  // src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.ts
639
- import { useEffect as useEffect11, useLayoutEffect } from "react";
659
+ import { useEffect as useEffect12, useLayoutEffect } from "react";
640
660
  var isServer = typeof window === "undefined";
641
- var useIsomorphicLayoutEffect = isServer ? useEffect11 : useLayoutEffect;
661
+ var useIsomorphicLayoutEffect = isServer ? useEffect12 : useLayoutEffect;
662
+
663
+ // src/hooks/useList/useList.ts
664
+ import { useMemo as useMemo5, useState as useState7 } from "react";
665
+
666
+ // src/hooks/usePreservedReference/usePreservedReference.ts
667
+ import { useMemo as useMemo4, useRef as useRef9 } from "react";
668
+ function usePreservedReference(value, areValuesEqual = areDeeplyEqual) {
669
+ const ref = useRef9(value);
670
+ return useMemo4(() => {
671
+ if (!areValuesEqual(ref.current, value)) {
672
+ ref.current = value;
673
+ }
674
+ return ref.current;
675
+ }, [areValuesEqual, value]);
676
+ }
677
+ function areDeeplyEqual(x, y) {
678
+ return JSON.stringify(x) === JSON.stringify(y);
679
+ }
680
+
681
+ // src/hooks/useList/useList.ts
682
+ function useList(initialState = []) {
683
+ const [list, setList] = useState7(initialState);
684
+ const preservedInitialState = usePreservedReference(initialState);
685
+ const push = usePreservedCallback((value) => {
686
+ setList((prev) => [...prev, value]);
687
+ });
688
+ const insertAt = usePreservedCallback((index, value) => {
689
+ setList((prev) => {
690
+ const next = [...prev];
691
+ next.splice(index, 0, value);
692
+ return next;
693
+ });
694
+ });
695
+ const updateAt = usePreservedCallback((index, value) => {
696
+ setList((prev) => {
697
+ const next = [...prev];
698
+ next[index] = value;
699
+ return next;
700
+ });
701
+ });
702
+ const removeAt = usePreservedCallback((index) => {
703
+ setList((prev) => {
704
+ const next = [...prev];
705
+ next.splice(index, 1);
706
+ return next;
707
+ });
708
+ });
709
+ const setAll = usePreservedCallback((values) => {
710
+ setList(values);
711
+ });
712
+ const reset = usePreservedCallback(() => {
713
+ setList(preservedInitialState);
714
+ });
715
+ const actions = useMemo5(
716
+ () => ({ push, insertAt, updateAt, removeAt, setAll, reset }),
717
+ [push, insertAt, updateAt, removeAt, setAll, reset]
718
+ );
719
+ return [list, actions];
720
+ }
642
721
 
643
722
  // src/hooks/useLoading/useLoading.ts
644
- import { useCallback as useCallback12, useEffect as useEffect12, useMemo as useMemo4, useRef as useRef9, useState as useState6 } from "react";
723
+ import { useCallback as useCallback12, useEffect as useEffect13, useMemo as useMemo6, useRef as useRef10, useState as useState8 } from "react";
645
724
  function useLoading() {
646
- const [loading, setLoading] = useState6(false);
725
+ const [loading, setLoading] = useState8(false);
647
726
  const ref = useIsMountedRef();
648
727
  const startTransition = useCallback12(
649
728
  async (promise) => {
@@ -659,25 +738,28 @@ function useLoading() {
659
738
  },
660
739
  [ref.isMounted]
661
740
  );
662
- return useMemo4(() => [loading, startTransition], [loading, startTransition]);
741
+ return useMemo6(() => [loading, startTransition], [loading, startTransition]);
663
742
  }
664
743
  function useIsMountedRef() {
665
- const ref = useRef9({ isMounted: true }).current;
666
- useEffect12(() => {
667
- ref.isMounted = true;
668
- return () => {
669
- ref.isMounted = false;
670
- };
671
- }, [ref]);
744
+ const ref = useRef10({ isMounted: true }).current;
745
+ useEffect13(
746
+ function trackMountedState() {
747
+ ref.isMounted = true;
748
+ return () => {
749
+ ref.isMounted = false;
750
+ };
751
+ },
752
+ [ref]
753
+ );
672
754
  return ref;
673
755
  }
674
756
 
675
757
  // src/hooks/useLongPress/useLongPress.ts
676
- import { useCallback as useCallback13, useRef as useRef10 } from "react";
758
+ import { useCallback as useCallback13, useRef as useRef11 } from "react";
677
759
  function useLongPress(onLongPress, { delay = 500, moveThreshold, onClick, onLongPressEnd } = {}) {
678
- const timeoutRef = useRef10(null);
679
- const isLongPressActiveRef = useRef10(false);
680
- const initialPositionRef = useRef10({ x: 0, y: 0 });
760
+ const timeoutRef = useRef11(null);
761
+ const isLongPressActiveRef = useRef11(false);
762
+ const initialPositionRef = useRef11({ x: 0, y: 0 });
681
763
  const preservedOnLongPress = usePreservedCallback(onLongPress);
682
764
  const preservedOnClick = usePreservedCallback(onClick || (() => {
683
765
  }));
@@ -753,26 +835,9 @@ function useLongPress(onLongPress, { delay = 500, moveThreshold, onClick, onLong
753
835
  }
754
836
 
755
837
  // src/hooks/useMap/useMap.ts
756
- import { useCallback as useCallback14, useMemo as useMemo6, useState as useState7 } from "react";
757
-
758
- // src/hooks/usePreservedReference/usePreservedReference.ts
759
- import { useMemo as useMemo5, useRef as useRef11 } from "react";
760
- function usePreservedReference(value, areValuesEqual = areDeeplyEqual) {
761
- const ref = useRef11(value);
762
- return useMemo5(() => {
763
- if (!areValuesEqual(ref.current, value)) {
764
- ref.current = value;
765
- }
766
- return ref.current;
767
- }, [areValuesEqual, value]);
768
- }
769
- function areDeeplyEqual(x, y) {
770
- return JSON.stringify(x) === JSON.stringify(y);
771
- }
772
-
773
- // src/hooks/useMap/useMap.ts
838
+ import { useCallback as useCallback14, useMemo as useMemo7, useState as useState9 } from "react";
774
839
  function useMap(initialState = /* @__PURE__ */ new Map()) {
775
- const [map, setMap] = useState7(() => new Map(initialState));
840
+ const [map, setMap] = useState9(() => new Map(initialState));
776
841
  const preservedInitialState = usePreservedReference(initialState);
777
842
  const set = useCallback14((key, value) => {
778
843
  setMap((prev) => {
@@ -794,14 +859,14 @@ function useMap(initialState = /* @__PURE__ */ new Map()) {
794
859
  const reset = useCallback14(() => {
795
860
  setMap(() => new Map(preservedInitialState));
796
861
  }, [preservedInitialState]);
797
- const actions = useMemo6(() => {
862
+ const actions = useMemo7(() => {
798
863
  return { set, setAll, remove, reset };
799
864
  }, [set, setAll, remove, reset]);
800
865
  return [map, actions];
801
866
  }
802
867
 
803
868
  // src/hooks/useOutsideClickEffect/useOutsideClickEffect.ts
804
- import { useEffect as useEffect13, useRef as useRef12 } from "react";
869
+ import { useEffect as useEffect14, useRef as useRef12 } from "react";
805
870
  function useOutsideClickEffect(container, callback) {
806
871
  const containers = useRef12([]);
807
872
  const handleDocumentClick = usePreservedCallback(({ target }) => {
@@ -816,10 +881,10 @@ function useOutsideClickEffect(container, callback) {
816
881
  }
817
882
  callback();
818
883
  });
819
- useEffect13(() => {
884
+ useEffect14(() => {
820
885
  containers.current = [container].flat(1).filter((item) => item != null);
821
886
  }, [container]);
822
- useEffect13(() => {
887
+ useEffect14(() => {
823
888
  document.addEventListener("click", handleDocumentClick);
824
889
  return () => {
825
890
  document.removeEventListener("click", handleDocumentClick);
@@ -845,6 +910,49 @@ function usePrevious(state, compare = strictEquals) {
845
910
  return prevRef.current;
846
911
  }
847
912
 
913
+ // src/hooks/useSet/useSet.ts
914
+ import { useMemo as useMemo8, useState as useState10 } from "react";
915
+ function useSet(initialState = /* @__PURE__ */ new Set()) {
916
+ const [set, setSet] = useState10(() => new Set(initialState));
917
+ const preservedInitialState = usePreservedReference(initialState);
918
+ const add = usePreservedCallback((value) => {
919
+ setSet((prev) => {
920
+ const nextSet = new Set(prev);
921
+ nextSet.add(value);
922
+ return nextSet;
923
+ });
924
+ });
925
+ const remove = usePreservedCallback((value) => {
926
+ setSet((prev) => {
927
+ const nextSet = new Set(prev);
928
+ nextSet.delete(value);
929
+ return nextSet;
930
+ });
931
+ });
932
+ const toggle2 = usePreservedCallback((value) => {
933
+ setSet((prev) => {
934
+ const nextSet = new Set(prev);
935
+ if (nextSet.has(value)) {
936
+ nextSet.delete(value);
937
+ } else {
938
+ nextSet.add(value);
939
+ }
940
+ return nextSet;
941
+ });
942
+ });
943
+ const setAll = usePreservedCallback((values) => {
944
+ setSet(() => new Set(values));
945
+ });
946
+ const reset = usePreservedCallback(() => {
947
+ setSet(() => new Set(preservedInitialState));
948
+ });
949
+ const actions = useMemo8(
950
+ () => ({ add, remove, toggle: toggle2, setAll, reset }),
951
+ [add, remove, toggle2, setAll, reset]
952
+ );
953
+ return [set, actions];
954
+ }
955
+
848
956
  // src/hooks/useStorageState/useStorageState.ts
849
957
  import { useCallback as useCallback15, useRef as useRef14, useSyncExternalStore } from "react";
850
958
 
@@ -1012,7 +1120,7 @@ function useStorageState(key, {
1012
1120
  }
1013
1121
 
1014
1122
  // src/hooks/useThrottle/useThrottle.ts
1015
- import { useEffect as useEffect14, useMemo as useMemo7 } from "react";
1123
+ import { useEffect as useEffect15, useMemo as useMemo9 } from "react";
1016
1124
 
1017
1125
  // src/hooks/useThrottle/throttle.ts
1018
1126
  function throttle(func, throttleMs, { edges = ["leading", "trailing"] } = {}) {
@@ -1037,11 +1145,11 @@ function throttle(func, throttleMs, { edges = ["leading", "trailing"] } = {}) {
1037
1145
  function useThrottle(callback, wait, options) {
1038
1146
  const preservedCallback = usePreservedCallback(callback);
1039
1147
  const preservedOptions = usePreservedReference(options ?? {});
1040
- const throttledCallback = useMemo7(
1148
+ const throttledCallback = useMemo9(
1041
1149
  () => throttle(preservedCallback, wait, preservedOptions),
1042
1150
  [preservedOptions, preservedCallback, wait]
1043
1151
  );
1044
- useEffect14(() => {
1152
+ useEffect15(() => {
1045
1153
  return () => {
1046
1154
  throttledCallback.cancel();
1047
1155
  };
@@ -1049,13 +1157,51 @@ function useThrottle(callback, wait, options) {
1049
1157
  return throttledCallback;
1050
1158
  }
1051
1159
 
1160
+ // src/hooks/useThrottledCallback/useThrottledCallback.ts
1161
+ import { useCallback as useCallback16, useEffect as useEffect16, useRef as useRef15 } from "react";
1162
+ function useThrottledCallback({
1163
+ onChange,
1164
+ timeThreshold,
1165
+ edges = ["leading", "trailing"]
1166
+ }) {
1167
+ const handleChange = usePreservedCallback(onChange);
1168
+ const ref = useRef15({ value: false, clearPreviousThrottle: () => {
1169
+ } });
1170
+ useEffect16(function cleanupThrottleOnUnmount() {
1171
+ const current = ref.current;
1172
+ return () => {
1173
+ current.clearPreviousThrottle();
1174
+ };
1175
+ }, []);
1176
+ const preservedEdges = usePreservedReference(edges);
1177
+ return useCallback16(
1178
+ (nextValue) => {
1179
+ if (nextValue === ref.current.value) {
1180
+ return;
1181
+ }
1182
+ const throttled = throttle(
1183
+ () => {
1184
+ handleChange(nextValue);
1185
+ ref.current.value = nextValue;
1186
+ },
1187
+ timeThreshold,
1188
+ { edges: preservedEdges }
1189
+ );
1190
+ ref.current.clearPreviousThrottle();
1191
+ throttled();
1192
+ ref.current.clearPreviousThrottle = throttled.cancel;
1193
+ },
1194
+ [handleChange, timeThreshold, preservedEdges]
1195
+ );
1196
+ }
1197
+
1052
1198
  // src/hooks/useTimeout/useTimeout.ts
1053
- import { useEffect as useEffect15 } from "react";
1199
+ import { useEffect as useEffect17 } from "react";
1054
1200
  function useTimeout(callback, delay = 0) {
1055
1201
  const preservedCallback = usePreservedCallback(callback);
1056
- useEffect15(() => {
1057
- const timeoutId = window.setTimeout(preservedCallback, delay);
1058
- return () => window.clearTimeout(timeoutId);
1202
+ useEffect17(() => {
1203
+ const timeoutId = setTimeout(preservedCallback, delay);
1204
+ return () => clearTimeout(timeoutId);
1059
1205
  }, [delay, preservedCallback]);
1060
1206
  }
1061
1207
 
@@ -1067,12 +1213,12 @@ function useToggle(initialValue = false) {
1067
1213
  var toggle = (state) => !state;
1068
1214
 
1069
1215
  // src/utils/buildContext/buildContext.tsx
1070
- import { createContext, useContext, useMemo as useMemo8 } from "react";
1216
+ import { createContext, useContext, useMemo as useMemo10 } from "react";
1071
1217
  import { jsx as jsx3 } from "react/jsx-runtime";
1072
1218
  function buildContext(contextName, defaultContextValues) {
1073
1219
  const Context = createContext(defaultContextValues ?? void 0);
1074
1220
  function Provider({ children, ...contextValues }) {
1075
- const value = useMemo8(
1221
+ const value = useMemo10(
1076
1222
  () => Object.keys(contextValues).length > 0 ? contextValues : null,
1077
1223
  // eslint-disable-next-line react-hooks/exhaustive-deps
1078
1224
  [...Object.values(contextValues)]
@@ -1153,7 +1299,9 @@ export {
1153
1299
  useInputState,
1154
1300
  useIntersectionObserver,
1155
1301
  useInterval,
1302
+ useIsClient,
1156
1303
  useIsomorphicLayoutEffect,
1304
+ useList,
1157
1305
  useLoading,
1158
1306
  useLongPress,
1159
1307
  useMap,
@@ -1162,8 +1310,10 @@ export {
1162
1310
  usePreservedReference,
1163
1311
  usePrevious,
1164
1312
  useRefEffect,
1313
+ useSet,
1165
1314
  useStorageState,
1166
1315
  useThrottle,
1316
+ useThrottledCallback,
1167
1317
  useTimeout,
1168
1318
  useToggle,
1169
1319
  useVisibilityEvent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simplikit",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./esm/index.js",
6
6
  "types": "./dist/index.d.cts",