Skip to content

react/no-render-return-value Correctness

This rule is turned on by default.

What it does

This rule will warn you if you try to use the ReactDOM.render() return value.

Example

Examples of incorrect code for this rule:

jsx
vaa inst =ReactDOM.render(<App />, document.body);
function render() {
 return ReactDOM.render(<App />, document.body);
}

Examples of correct code for this rule:

jsx
ReactDOM.render(<App />, document.body);

References

Released under the MIT License.