Created
September 19, 2020 18:32
-
-
Save 0x1bitcrack3r/e19241cf77af74e0c08cb3de0ddf705b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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