Skip to content

Releases: Doko-Demo-Doa/react-native-shake

5.1.0 release

02 Nov 07:37
Compare
Choose a tag to compare

With this new release, I have removed removeListener as addListener method now returns an EmitterSubscription, allows you to create and use multiple RNShake instances. Example with useEffect hook:

import React from 'react'

export const MyComponent = () => {
  React.useEffect(() => {
    const subscription = RNShake.addListener(() => {
      // Your code here...
    })

    return () => {
      // Your code here...
      subscription.remove()
    }
  }, [])
}

4.0.2

15 May 13:34
Compare
Choose a tag to compare

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.

Breaking changes

  • The lib now uses NativeEventEmitter because old bridge implementation is deprecated. Worry not, little will change.
  • 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 [email protected]

3.5.0

25 Oct 18:00
Compare
Choose a tag to compare

Merged everything up until #23

3.1.0 released

11 Aug 03:57
Compare
Choose a tag to compare
  • Fixed compatibility with React Native 0.47.1