Skip to content

Instantly share code, notes, and snippets.

@0x1bitcrack3r
Created September 19, 2020 18:32
Show Gist options
  • Save 0x1bitcrack3r/e19241cf77af74e0c08cb3de0ddf705b to your computer and use it in GitHub Desktop.
Save 0x1bitcrack3r/e19241cf77af74e0c08cb3de0ddf705b to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
import { DeviceEventEmitter } from 'react-native'
class MainComponent extends Component {
componentDidMount() {
DeviceEventEmitter.addListener('accept', () => {
//Do something!
})
DeviceEventEmitter.addListener('reject', () => {
//Do something!
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment