Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount() oneliner in docs should be clearer #1523

Closed
getaaron opened this issue Feb 9, 2018 · 0 comments
Closed

mount() oneliner in docs should be clearer #1523

getaaron opened this issue Feb 9, 2018 · 0 comments

Comments

@getaaron
Copy link

getaaron commented Feb 9, 2018

The ReactWrapper docs say:

.mount() => ReactWrapper

A method that re-mounts the component.

A developer using Enzyme who reads this one-liner without reading the full docs will incorrectly believe that a call to mount() will re-mount any component. In fact, this method will only mount an unmounted component. It will do nothing if the component is already mounted.

A more precise summary would be something like:

.mount() => ReactWrapper

A method that (re-)mounts the component, if it is not currently mounted.

mount.md and the comments in ReactWrapper.js would need to be updated as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants