An open API service indexing awesome lists of open source software.

https://github.com/contigen/shake-to-refresh


https://github.com/contigen/shake-to-refresh

Last synced: about 1 month ago
JSON representation

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.