Skip to content

Commit

Permalink
[added] update README regarding onAfterOpen and Jest
Browse files Browse the repository at this point in the history
  • Loading branch information
postrad committed Jun 10, 2021
1 parent b33923a commit 8c0f219
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

# NOTE

Need feedback to push a new version of `react-modal` forward. See issue [#881](https://github.com/reactjs/react-modal/issues/881).
Need feedback to push a new version of `react-modal` forward. See issue [#881](https://github.com/reactjs/react-modal/issues/881).


Accessible modal dialog component for React.JS
Expand Down Expand Up @@ -118,3 +118,7 @@ demonstrate various features of react-modal:
* [Using inline styles](https://codepen.io/claydiffrient/pen/ZBmyKz)
* [Using CSS classes for styling](https://codepen.io/claydiffrient/pen/KNjVrG)
* [Customizing the default styles](https://codepen.io/claydiffrient/pen/pNXgqQ)

## Testing `onAfterOpen` and Jest

The `onAfterOpen` prop calls `requestAnimationFrame` which can break Jest tests that were written prior to [v3.14.1](https://github.com/reactjs/react-modal/releases/tag/v3.14.1). Please review the [Jest bug](https://github.com/facebook/jest/issues/5147) for details on how to resolve these test failures, as well as how to support new tests related to `onAfterOpen`.

0 comments on commit 8c0f219

Please sign in to comment.