+
Skip to content

Remove all usages of return value for ReactDOM.render and TestUtils.renderIntoDocument #133

Open
@azasypkin

Description

@azasypkin

As per [1] we shouldn't rely on return value of ReactDOM.render and TestUtils.renderIntoDocument because of:

ReactDOM.render() currently returns a reference to the root ReactComponent instance.
However, using this return value is legacy and should be avoided because future versions
of React may render components asynchronously in some cases. If you need a reference
to the root ReactComponent instance, the preferred solution is to attach a callback ref to
the root element.

It's also a reason of some unit tests intermittent failures we have currently.

[1] https://facebook.github.io/react/docs/top-level-api.html

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载