---
source: crates/oxc_linter/src/tester.rs
expression: require_render_return
---
  ⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
   ╭─[require_render_return.tsx:3:1]
 3 │                       displayName: 'Hello',
 4 │                       render: function() {}
   ·                                          ──
 5 │                     });
   ╰────
  help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.

  ⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
   ╭─[require_render_return.tsx:2:1]
 2 │                     class Hello extends React.Component {
 3 │                       render() {}
   ·                                ──
 4 │                     }
   ╰────
  help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.

  ⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
   ╭─[require_render_return.tsx:2:1]
 2 │                         class Hello extends React.Component {
 3 │ ╭─▶                       render() {
 4 │ │                           const names = this.props.names.map(function(name) {
 5 │ │                             return <div>{name}</div>
 6 │ │                           });
 7 │ ╰─▶                       }
 8 │                         }
   ╰────
  help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.

  ⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
   ╭─[require_render_return.tsx:2:1]
 2 │                         class Hello extends React.Component {
 3 │ ╭─▶                       render = () => {
 4 │ │                           <div>Hello {this.props.name}</div>
 5 │ ╰─▶                       }
 6 │                         }
   ╰────
  help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.


