Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MacKentoch/614575904459bcec2055eb0e05476f12 to your computer and use it in GitHub Desktop.
Save MacKentoch/614575904459bcec2055eb0e05476f12 to your computer and use it in GitHub Desktop.
// ...
componentDidMount() {
// Ranging: Listen for beacon changes
this.beaconsDidRange = DeviceEventEmitter.addListener(
'beaconsDidRange',
(data) => {
this.setState({
dataSource: this.state.dataSource.cloneWithRows(data.beacons)
});
}
);
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment