How to use the react-refresh/runtime.hasUnrecoverableErrors function in react-refresh

To help you get started, we’ve selected a few react-refresh 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 pmmmwh / react-refresh-webpack-plugin / src / runtime / utils.js View on Github external
function hotDisposeCallback(data) {
    if (Refresh.hasUnrecoverableErrors()) {
      window.location.reload();
    }

    // We have to mutate the data object to get data registered and cached
    data.module = module;
  }