Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
b07cf67
docs: revamp the docs for readme and guideline
Ashish-simpleCoder Dec 28, 2024
9e8bc78
feat[breaking]: change implementation of useEventListener and other e…
Ashish-simpleCoder May 15, 2025
4b1a877
test: update test for useWindowResize hook for function branch to cov…
Ashish-simpleCoder May 15, 2025
1085f54
test: update test config include glob pattern to watch only .tsx and …
Ashish-simpleCoder May 17, 2025
cddb76b
feat: change api for event hooks
Ashish-simpleCoder May 17, 2025
0754d8c
feat: update api for use-intersection-hook
Ashish-simpleCoder May 24, 2025
ee1c492
feat: change api for use-local-storage hook
Ashish-simpleCoder May 25, 2025
dfd1d8d
feat: change api for use-debounced-fn
Ashish-simpleCoder May 29, 2025
c406948
feat: change api implementation for useDebouncedFn and useThrottledFn
Ashish-simpleCoder May 30, 2025
6a468ed
canary: rewrite docs and hooks
Ashish-simpleCoder Jun 7, 2025
03723f3
v2 canary
Ashish-simpleCoder Jun 7, 2025
6d959f8
docs: add docs version links
Ashish-simpleCoder Jun 7, 2025
44ce4b9
docs: update js-docs for all of the hooks
Ashish-simpleCoder Jun 12, 2025
28e9550
try fixing test failing in workflow
Ashish-simpleCoder Jun 12, 2025
5be1cd2
try fixing test failing in workflow
Ashish-simpleCoder Jun 12, 2025
5022916
fix: react types version in devDependencies
Ashish-simpleCoder Jun 12, 2025
b5e4676
Version Packages (canary)
github-actions[bot] Jun 12, 2025
e95d1a3
Merge pull request #71 from Ashish-simpleCoder/changeset-release/canary
Ashish-simpleCoder Jun 12, 2025
703c876
feat: introduce useCanReachToInternet hook
Ashish-simpleCoder Jun 27, 2025
4f2934d
Merge branch 'canary' of https://github.com/Ashish-simpleCoder/classi…
Ashish-simpleCoder Jun 27, 2025
5509803
Version Packages (canary)
github-actions[bot] Jun 27, 2025
03884de
Merge pull request #73 from Ashish-simpleCoder/changeset-release/canary
Ashish-simpleCoder Jun 27, 2025
3e110b2
Docs: add new sections and update docs
Ashish-simpleCoder Jul 1, 2025
8d4267f
Version Packages (canary)
github-actions[bot] Jul 3, 2025
0e56333
Merge pull request #74 from Ashish-simpleCoder/changeset-release/canary
Ashish-simpleCoder Jul 3, 2025
c52bb9f
docs: add CanReachToInterernetCtxProvder doc
Ashish-simpleCoder Jul 3, 2025
4f40304
Version Packages (canary)
github-actions[bot] Jul 3, 2025
c0b3b1f
Merge pull request #75 from Ashish-simpleCoder/changeset-release/canary
Ashish-simpleCoder Jul 3, 2025
51e96f8
doc: update docs for hooks and home page for the documentation site
Ashish-simpleCoder Jul 6, 2025
ee64212
Version Packages (canary)
github-actions[bot] Jul 6, 2025
550863d
Merge pull request #76 from Ashish-simpleCoder/changeset-release/canary
Ashish-simpleCoder Jul 6, 2025
c20ae22
build: include src folder in npm publish
Ashish-simpleCoder Jul 10, 2025
39ece03
Version Packages (canary) (#77)
Ashish-simpleCoder Jul 10, 2025
cc71e9c
Update docs
Ashish-simpleCoder Jul 13, 2025
36a4500
Docs update(canary) (#78)
Ashish-simpleCoder Jul 13, 2025
56478c2
Docs: Update features and overview section
Ashish-simpleCoder Jul 19, 2025
f0f3c02
Version Packages (canary) (#79)
Ashish-simpleCoder Jul 19, 2025
e73af53
feat: Introduce layoutEffect boolean prop for use-event-listener hook
Ashish-simpleCoder Jul 19, 2025
9656890
fix: code error for lazy-load-wrapper
Ashish-simpleCoder Jul 19, 2025
740536f
fix: tsc error
Ashish-simpleCoder Jul 19, 2025
2f91a3d
Version Packages (canary) (#80)
Ashish-simpleCoder Jul 19, 2025
5807a38
ci: add canary branch in githug ci release
Ashish-simpleCoder Jul 19, 2025
b195e62
Version Packages (canary) (#81)
Ashish-simpleCoder Jul 19, 2025
4f5bb6c
feat: re-implment the use-intersection-hook api
Ashish-simpleCoder Jul 26, 2025
d96cbd3
Merge branch 'canary' of https://github.com/Ashish-simpleCoder/classi…
Ashish-simpleCoder Jul 26, 2025
29977ff
Version Packages (canary)
github-actions[bot] Jul 26, 2025
5877980
docs: [wip] new docs
Ashish-simpleCoder Jul 29, 2025
214c673
Version Packages (canary)
github-actions[bot] Jul 29, 2025
ff4615c
docs: revamp to new doc version for use-multi-intersection-observer
Ashish-simpleCoder Jul 31, 2025
d905556
Version Packages (canary)
github-actions[bot] Jul 31, 2025
a2f9744
docs: major rewrite of the documentation
Ashish-simpleCoder Sep 22, 2025
c227257
update release note
Ashish-simpleCoder Sep 22, 2025
fc206f5
Version Packages (canary)
github-actions[bot] Sep 22, 2025
60dceb9
fix: subscribe function in useSyncExternalStore hook for navigator.on…
Ashish-simpleCoder Sep 22, 2025
fb26e91
test: new test cases for use-can-reach and use-copy-clipboard hooks
Ashish-simpleCoder Sep 22, 2025
6f1c2e0
Version Packages (canary)
github-actions[bot] Sep 22, 2025
87b8bbb
Add cross-tab sync and ssr support and function based initial value s…
Ashish-simpleCoder Oct 2, 2025
3cdf74e
fix: type issues
Ashish-simpleCoder Oct 2, 2025
43cc6b5
Version Packages (canary)
github-actions[bot] Oct 2, 2025
0d1ac96
fix: cleanup of timeout/interval effect on interval-prop change
Ashish-simpleCoder Oct 11, 2025
31fc64c
Version Packages (canary)
github-actions[bot] Oct 12, 2025
8305b6d
fix: missing export for use-multi-intersection-observer hook
Ashish-simpleCoder Oct 15, 2025
1071a49
fix: missing export for use-multi-intersection-observer hook
Ashish-simpleCoder Oct 15, 2025
c4d6d55
Version Packages (canary)
github-actions[bot] Oct 18, 2025
c534ff5
feat: introduce setElementRef in useEventListener to watch target
Ashish-simpleCoder Oct 19, 2025
1b4764d
Version Packages (canary)
github-actions[bot] Oct 19, 2025
8656fb1
feat: use setElementRef in useOutsideClick hook
Ashish-simpleCoder Oct 20, 2025
f8af3e3
build: update dependencies, pnpm and node version
Ashish-simpleCoder Oct 20, 2025
5ef94d0
Version Packages (canary)
github-actions[bot] Oct 26, 2025
24fcfbf
docs: update docs for hooks
Ashish-simpleCoder Nov 8, 2025
eafd11c
docs: fix imports in js-doc examples
Ashish-simpleCoder Nov 8, 2025
e61c486
ref: update js-doc and type-definition
Ashish-simpleCoder Nov 13, 2025
353a2d3
fix: network state update on online/offline event when polling is off
Ashish-simpleCoder Nov 13, 2025
5e45821
fix: create seperate setElementRef for target setting in use-outside-…
Ashish-simpleCoder Nov 14, 2025
b9d8053
test: refactor and add new the test cases
Ashish-simpleCoder Nov 15, 2025
43731a2
fix: making capture flag to false for use-outside-click
Ashish-simpleCoder Nov 16, 2025
f2ae6a7
fix: disable querying the dom element via target handler for ssr env
Ashish-simpleCoder Nov 16, 2025
bd3d41e
fix: lazily set target for outside and use-event-listener
Ashish-simpleCoder Nov 19, 2025
f5197b4
ci: bump to minor version 2.0.0-canary.21
Ashish-simpleCoder Nov 19, 2025
e9e04ba
Version Packages (canary)
github-actions[bot] Nov 19, 2025
5e43e42
build: update target build to esnext in bundler
Ashish-simpleCoder Dec 8, 2025
4fcc30a
Version Packages (canary)
github-actions[bot] Dec 8, 2025
a0c4e96
ref: Initialize context lazily within ContextProvider for can-reach-t…
Ashish-simpleCoder Dec 9, 2025
8bbe9db
Version Packages (canary)
github-actions[bot] Dec 9, 2025
2ac24b8
chore: add editorconfig and cleanup files
Ashish-simpleCoder Dec 11, 2025
ab12cc5
build: upgrade from tsup to tsdown bundler
Ashish-simpleCoder Dec 12, 2025
225917c
Version Packages (canary)
github-actions[bot] Dec 12, 2025
6822e7e
test: Add ssr test for use-local-storage
Ashish-simpleCoder Dec 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brown-bears-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

build: upgrade from tsup to tsdown bundler
21 changes: 21 additions & 0 deletions .changeset/brown-wolves-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'classic-react-hooks': minor
---

## Major Rewrite for the Documentation
- home page and overview
- use-can-reach-to-internet
- use-copy-to-clipboard
- use-counter
- use-debounced-fn
- use-event-listener
- use-intersection-observer
- use-multi-intersection-observer
- use-interval-effect
- use-on-mount-effect
- use-outside-effect
- use-synced-effect
- use-synced-ref
- use-throttled-fn
- use-timeout-effect
- use-window-resize
5 changes: 5 additions & 0 deletions .changeset/clean-coats-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

Doc update
5 changes: 5 additions & 0 deletions .changeset/cool-emus-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

Docs: Update features and overview section
6 changes: 6 additions & 0 deletions .changeset/cool-spoons-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'classic-react-hooks': minor
---

Feature:
- Add cross-tab sync and ssr support and function based initial value support for `useLocalStorage` hook.
10 changes: 10 additions & 0 deletions .changeset/cuddly-melons-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'classic-react-hooks': minor
---


- Doc: Add `what problem it solves` doc for useCanReachToInternet
- Doc: Refactor the docs for hooks



5 changes: 5 additions & 0 deletions .changeset/early-apes-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

- Update dependencies, pnpm and node version for better security and performance
5 changes: 5 additions & 0 deletions .changeset/fresh-hounds-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

Include src folder in npm publish
5 changes: 5 additions & 0 deletions .changeset/good-vans-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

Add CanReachToInterernetCtxProvder and useCanReachToInternetCtx component's documentation
5 changes: 5 additions & 0 deletions .changeset/hungry-moons-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---
Feat: Introduce `layoutEffect` boolean prop in use-event-listener hook to pickup `useEffect` between `useLayoutEffect`. By default `useEffect` hook will be used.
Feat: Using layoutEffect for use-window-resize hook.
7 changes: 7 additions & 0 deletions .changeset/icy-boats-make.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'classic-react-hooks': major
---

Breaking
- v2 release prepare
- Rewrite all of the hooks and their documenation
5 changes: 5 additions & 0 deletions .changeset/mighty-donkeys-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

ref: Initialize context lazily within ContextProvider component for can-reach-to-internet-context
7 changes: 7 additions & 0 deletions .changeset/modern-ants-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'classic-react-hooks': minor
---


- breaking: use the implementation and working for `useIntersection` observer hook.
- feat: introduce new hook `useMultiIntersectionObserver` hook.
12 changes: 12 additions & 0 deletions .changeset/moody-pens-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'classic-react-hooks': minor
---


## Fixes following issues
- Fix: use-can-reach-to-internet `subscribe` handler for `useSyncExternalStore`. It was adding events instead of removing.
- Fix: Prevent from re-triggering the call of `checkIfCanReachToInternet` function in useEffect when `isNetworkPollingEnabled` is disabled.

## Test cases
- Wrote test cases for use-can-reach-to-internet and use-copy-to-clipboard hook. Previously not written.

7 changes: 7 additions & 0 deletions .changeset/pink-pugs-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'classic-react-hooks': minor
---

- breaking: remove useIsOnline hook
- Feat: add useCanReachToInternet for getting network connection
- Feat: add useCanReachToInternetCtx and CanReachToInternetCtxProvider for subscribing the application to get network reachability with context
5 changes: 5 additions & 0 deletions .changeset/popular-students-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

Add canary branch in CI release
34 changes: 34 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"mode": "pre",
"tag": "canary",
"initialVersions": {
"classic-react-hooks": "1.4.0"
},
"changesets": [
"brown-bears-cheat",
"brown-wolves-play",
"clean-coats-occur",
"cool-emus-lie",
"cool-spoons-fold",
"cuddly-melons-turn",
"early-apes-march",
"fresh-hounds-move",
"good-vans-impress",
"hungry-moons-serve",
"icy-boats-make",
"mighty-donkeys-roll",
"modern-ants-add",
"moody-pens-poke",
"pink-pugs-eat",
"popular-students-happen",
"silver-radios-tickle",
"slick-carrots-stick",
"spotty-jeans-carry",
"stale-radios-rule",
"tender-sites-occur",
"thirty-foxes-wink",
"twenty-pans-search",
"violet-cherries-applaud",
"warm-olives-punch"
]
}
5 changes: 5 additions & 0 deletions .changeset/silver-radios-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

- Fix timeout and interval effect cleanup when interval changes
5 changes: 5 additions & 0 deletions .changeset/slick-carrots-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

Update target build to esnext in builder
5 changes: 5 additions & 0 deletions .changeset/spotty-jeans-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

- Fix missing export for `useMultipleIntersectionObserver` hook
6 changes: 6 additions & 0 deletions .changeset/stale-radios-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'classic-react-hooks': patch
---

Docs: Start overhauling to new documentation
- Create new docs for `use-event-listener` and `use-intersection-observer` hooks
5 changes: 5 additions & 0 deletions .changeset/tender-sites-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

Docs - add usage example in js-doc for all of the hooks
5 changes: 5 additions & 0 deletions .changeset/thirty-foxes-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

- Introduce second method `setElementRef` function for observing target with `ref` attribute (i.e. ref={setElementRef})
17 changes: 17 additions & 0 deletions .changeset/twenty-pans-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'classic-react-hooks': minor
---

## Doc Fixes
- docs: fix imports in js-doc examples
- types: Update type definitions to common types folder
- docs: update docs for hooks

## Test Updates
- test: refactor and add new the test cases

## Bug Fixes
- fix: network state update on online/offline event when polling is off(7c765e984556b8496667dd057ca20bc6586e82b6)
- fix: create seperate setElementRef for target setting in use-outside-click(ff812ca88e527c12b3604fb559c1b3d6b87ca7d9)
- fix: making capture flag to false for use-outside-click(fd31ba46b569ed298de6c7a445204beea2c57284)
- fix: lazily set target for outside and use-event-listener(1a387a1fe05dc8a736a629d8a66d067a3162340e)
5 changes: 5 additions & 0 deletions .changeset/violet-cherries-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': patch
---

Update docs for copy-to-clipboard and deboucned-fn hook
5 changes: 5 additions & 0 deletions .changeset/warm-olives-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'classic-react-hooks': minor
---

docs: revamp to new doc version for `use-multi-intersection-observer`
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 3
tab_width = 3
max_line_length = 120
trim_trailing_whitespace = true
insert_final_newline = true
32 changes: 32 additions & 0 deletions .github/workflows/canary-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish
on:
push:
branches:
- canary

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
canary:
runs-on: 'ubuntu-latest'
permissions: write-all
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
# with:
# version: 8
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'

- run: pnpm install --no-frozen-lockfile

- name: Create Canary Release Pull Request or Canary Publish
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
publish: pnpm release
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- 'main'
- 'canary'

jobs:
build:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ apps/*
apps/doc/.vitepress/cache


src/**/*.dev.tsx
/**/*.dev.tsx
/**/*.dev.ts
/**/*.dev.jsx
/**/*.dev.js
/**/*.dev.md
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.14.2
22.17.0
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ node_modules
public
apps/doc/.vitepress/cache
apps/example
.changeset
.changeset

pnpm-lock.yaml
Loading