Skip to content

v5.4.0 - Now supports Promises/Async methods

Compare
Choose a tag to compare
@tizmagik tizmagik released this 23 Aug 19:29

Thanks to @spencewood in #82 react-tracking now supports async functions (or functions that return a Promise)

  @track()
  async handleEvent() {
    return await asyncCall(); // returns a promise
  }

See the main README documentation for more details, including how to conditionally dispatch a tracking event only when the promise resolves and/or rejects.