Skip to content

JavaScript

API calls

  • use Promise.all when making multiple calls that don't need to wait for the previous to finish
  • when making a delete api call, nothing should be returned from the store action

Tips

  • use .then and .catch with requests that return promises
  • avoid using window.open most browsers block it via built in pop up blockers

Unit Tests

  • can run a single test by running
    bash
    yarn test:unit -t "{{test name}}"