Skip to content

Conversation

@kimyouknow
Copy link
Collaborator

Overview

Checklist

  • Did you write the test code?
  • Have you run yarn run fix to format and lint the code and docs?
  • Have you run yarn run test:coverage to make sure there is no uncovered line?
  • Did you write the JSDoc?

The following hooks have been marked as deprecated due to their reliance on browser-specific APIs, as react-simplikit shifts focus to platform-independent, pure state/logic hooks:
- useDoubleClick
- useGeolocation
- useImpressionRef
- useIntersectionObserver
- useLongPress
- useOutsideClickEffect
- useStorageState
- useVisibilityEvent

These hooks will be removed in a future major version.
Reposition react-simplikit as a Universal Hook Library focused on platform-independent, pure state/logic hooks. Maintain backward compatibility for existing hooks like `useToggle` and `usePrevious`, while deprecating browser/platform-dependent hooks such as `useGeolocation` and `useDoubleClick`, which will not receive new features and may be removed in future versions.
…c hooks

Updated the README to emphasize that react-simplikit will exclusively support platform-independent pure state/logic hooks, while deprecating browser/platform-dependent hooks. Ensured backward compatibility for existing hooks and outlined the ongoing maintenance plan for the library.
@github-actions
Copy link
Contributor

Size Change: 0 B

Total Size: 65.5 kB

ℹ️ View Unchanged
Filename Size
./dist/components/ImpressionArea/index.cjs 2.24 kB
./dist/components/Separated/index.cjs 715 B
./dist/components/SwitchCase/index.cjs 587 B
./dist/hooks/useAsyncEffect/index.cjs 610 B
./dist/hooks/useBooleanState/index.cjs 661 B
./dist/hooks/useCallbackOncePerRender/index.cjs 731 B
./dist/hooks/useConditionalEffect/index.cjs 784 B
./dist/hooks/useControlledState/index.cjs 791 B
./dist/hooks/useCounter/index.cjs 848 B
./dist/hooks/useDebounce/index.cjs 1.13 kB
./dist/hooks/useDebouncedCallback/index.cjs 1.26 kB
./dist/hooks/useDoubleClick/index.cjs 861 B
./dist/hooks/useGeolocation/index.cjs 1.43 kB
./dist/hooks/useImpressionRef/index.cjs 1.96 kB
./dist/hooks/useInputState/index.cjs 676 B
./dist/hooks/useIntersectionObserver/index.cjs 952 B
./dist/hooks/useInterval/index.cjs 816 B
./dist/hooks/useIsomorphicLayoutEffect/index.cjs 587 B
./dist/hooks/useLoading/index.cjs 782 B
./dist/hooks/useLongPress/index.cjs 1.3 kB
./dist/hooks/useMap/index.cjs 925 B
./dist/hooks/useOutsideClickEffect/index.cjs 850 B
./dist/hooks/usePreservedCallback/index.cjs 630 B
./dist/hooks/usePreservedReference/index.cjs 679 B
./dist/hooks/usePrevious/index.cjs 682 B
./dist/hooks/useRefEffect/index.cjs 811 B
./dist/hooks/useStorageState/index.cjs 1.67 kB
./dist/hooks/useThrottle/index.cjs 1.32 kB
./dist/hooks/useTimeout/index.cjs 718 B
./dist/hooks/useToggle/index.cjs 585 B
./dist/hooks/useVisibilityEvent/index.cjs 698 B
./dist/index.cjs 8.39 kB
./dist/utils/buildContext/index.cjs 877 B
./dist/utils/mergeProps/index.cjs 786 B
./dist/utils/mergeRefs/index.cjs 593 B
./esm/components/ImpressionArea/index.js 1.85 kB
./esm/components/Separated/index.js 307 B
./esm/components/SwitchCase/index.js 183 B
./esm/hooks/useAsyncEffect/index.js 193 B
./esm/hooks/useBooleanState/index.js 247 B
./esm/hooks/useCallbackOncePerRender/index.js 322 B
./esm/hooks/useConditionalEffect/index.js 367 B
./esm/hooks/useControlledState/index.js 398 B
./esm/hooks/useCounter/index.js 449 B
./esm/hooks/useDebounce/index.js 722 B
./esm/hooks/useDebouncedCallback/index.js 864 B
./esm/hooks/useDoubleClick/index.js 462 B
./esm/hooks/useGeolocation/index.js 1.03 kB
./esm/hooks/useImpressionRef/index.js 1.57 kB
./esm/hooks/useInputState/index.js 266 B
./esm/hooks/useIntersectionObserver/index.js 546 B
./esm/hooks/useInterval/index.js 411 B
./esm/hooks/useIsomorphicLayoutEffect/index.js 170 B
./esm/hooks/useLoading/index.js 373 B
./esm/hooks/useLongPress/index.js 885 B
./esm/hooks/useMap/index.js 525 B
./esm/hooks/useOutsideClickEffect/index.js 443 B
./esm/hooks/usePreservedCallback/index.js 216 B
./esm/hooks/usePreservedReference/index.js 272 B
./esm/hooks/usePrevious/index.js 268 B
./esm/hooks/useRefEffect/index.js 412 B
./esm/hooks/useStorageState/index.js 1.3 kB
./esm/hooks/useThrottle/index.js 922 B
./esm/hooks/useTimeout/index.js 311 B
./esm/hooks/useToggle/index.js 169 B
./esm/hooks/useVisibilityEvent/index.js 294 B
./esm/index.js 7.81 kB
./esm/utils/buildContext/index.js 463 B
./esm/utils/mergeProps/index.js 403 B
./esm/utils/mergeRefs/index.js 191 B

compressed-size-action

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5bdb4ff) to head (0913231).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #302   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           37        37           
  Lines         1093      1093           
  Branches       324       324           
=========================================
  Hits          1093      1093           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants