How to use the react-native-zeroconf function in react-native-zeroconf

To help you get started, we’ve selected a few react-native-zeroconf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GPMDP / google-play-music-desktop-remote / src / screens / ZeroConfScreen.js View on Github external
componentDidMount () {
    this.CONNECTED_IP = this.props.settingsStore.IP_ADDRESS
    this.zeroconf = new Zeroconf()
    // this.zeroconf.scan('GPMDP')
    this.zeroconf.on('start', () => console.log('start.'))
    this.zeroconf.on('found', () => console.log('found'))
    this.zeroconf.on('resolved', (service) => {
      if ( !== this.CONNECTED_IP) {
        console.log('found service, adding to list', service)
          devices: this.state.devices.concat([service])
        // this.props.settingsStore.updateIPAddress(
    this.zeroconf.on('remove', (serviceName) => {
      console.log('removed', serviceName)


A Zeroconf discovery utility for react-native

Latest version published 6 months ago

Package Health Score

74 / 100
Full package analysis

Popular react-native-zeroconf functions

Popular JavaScript code snippets

Find secure code to use in your application or website