React Native Shake 4 released
· One min read
It's been a while, but I can finally come back to this project. With this new version, we have:
- Fully typed code with TypeScript.
- Rewritten iOS module. It now works on both Debug and Release mode.
- Shorter API. It's now just:
RNShake.addListener(() => {
// Your code...
});
Breaking changes
- The lib now uses
NativeEventEmitter
because old bridge implementation is deprecated. Worry not, little will changes. - 4 methods under the hood:
addListener
removeListener
removeAllListeners
removeCurrentListener
and they all return EmitterSubscription
, fully compatible with React Hooks.
I'm planning to expose a parameter to configure tension too. Stay tuned.
Feel free to try and give me the feedback:
npm install react-native-shake@4.0.2
You can find the repo here.