Skip to content

Commit

Permalink
Fix typo in API.md (clearCompileErrors -> clearCompileError) (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
vkrol authored Apr 25, 2024
1 parent 88e1441 commit 46efb13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ If the default `entry` is used, the file should contain two more **NAMED** expor

```ts
function showCompileError(webpackErrorMessage: string) {}
function clearCompileErrors() {}
function clearCompileError() {}
```

- `showCompileError` is invoked when an error occurred during a Webpack compilation
(NOTE: `webpackErrorMessage` might be ANSI encoded depending on the integration);
- `clearCompileErrors` is invoked when a new Webpack compilation is started (i.e. HMR rebuild).
- `clearCompileError` is invoked when a new Webpack compilation is started (i.e. HMR rebuild).

> Note: if you want to use `react-error-overlay` as a value to this option,
> you should instead use `react-dev-utils/refreshOverlayInterop` or implement a similar interop.
Expand Down

0 comments on commit 46efb13

Please sign in to comment.