Skip to content

Documentation for ShallowWrapper.setProps out of sync #1788

@wanecek

Description

@wanecek

Describe the bug
On the overview of functions for ShallowWrapper, setProps is denoted to accept a callback as the second argument (.setProps(nextProps[, callback]) => ShallowWrapper). On the details page, it only documents accepting the nextProps (.setProps(nextProps) => Self).

To Reproduce
N/A

Expected behavior
Since the callback does, in fact, seem to work, I would suggest documenting it (and also submitting a PR to @types/enzyme, which was how I noticed it). If it's intended to be deprecated, I suggest removing it from the overview and adding a note about in the details page.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
Seems to originate from #1361

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions