https://github.com/contigen/shake-to-refresh
https://github.com/contigen/shake-to-refresh
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/contigen/shake-to-refresh
- Owner: contigen
- Created: 2024-03-10T18:29:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T13:34:02.000Z (almost 2 years ago)
- Last Synced: 2025-12-04T20:56:17.807Z (7 months ago)
- Language: TypeScript
- Homepage: https://shake-to-refresh.vercel.app
- Size: 637 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shake

Shake your device to refresh with vibration.
This is a fun pilot project inspired when exploring the web docs for the Device Motion event.
Written in React & TypeScript with Vite.
## Issues
- Doesn't work on iOS & Firefox Android due to inadequate user activation - some permission, privacy thingy (the event is well supported) - It is a proof of concept so it was done rather hasty.
- The Vibration API isn't supported in Firefox Android & Safari, hence all iOS browsers.
### Fun fact
No `UseEffect`, this project was also an opportunity to use React’s `useSynExternalStore` hook - cool!
#### PS
I don't think you would test this on desktop, anyhow, I didn't.