
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@chenng/react-native-shake-event
Advanced tools
author: Jadson Lourenco jadsonlourenco@gmail.com
homepage: https://github.com/jadsonlourenco/react-native-shake-event
Notes: Source can not be used directly, republish it...
Add the shake event on your React Native app, giving to users improved usability. Enjoy! (works only on real device)
$ npm install @chenng/react-native-shake-event --save
react-native link @chenng/react-native-shake-event
import RNShakeEvent from 'react-native-shake-event';
class MyComponent extends React.Component {
componentWillMount() {
RNShakeEvent.addEventListener('shake', () => {
console.log('Device shake!');
});
}
componentWillUnmount() {
RNShakeEvent.removeEventListener('shake');
}
}
Start listening the shake event and handle a callback function.
Stop to listening the shake event, and is recommended to prevent memory leak.
On debug mode this event also handle the DevMenu, but works fine on production.
MIT
FAQs
Add shake event to your React Native app
We found that @chenng/react-native-shake-event demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.