github nytimes/react-tracking v5.6.0

latest releases: v9.3.2, v9.3.1, v9.3.0...
6 years ago

Thanks to @williardx in #105 we now avoid dispatching a tracking event when your decorated class member tracking call returns a falsy value:

@track({ module: 'button' })
class Thing extends Component {
  @track(() => {
    // some logic that eventually returns:
    return false; // won't dispatch
  })
  handleClick = () => { ... }

  render() {
    return <button onClick={this.handleClick}>Click me</button>
  }
}

Don't miss a new react-tracking release

NewReleases is sending notifications on new releases.