Skip to content

Files

Latest commit

 

History

History
43 lines (32 loc) · 696 Bytes

require-render-return.md

File metadata and controls

43 lines (32 loc) · 696 Bytes

Pattern: Missing return for render

Issue: -

Description

This rule aims to enforce render function to always return value.

<script>
export default {
  /* ✓ GOOD */
  render (h) {
    return h('div', 'hello')
  }
}
</script>
<script>
export default {
  /* ✗ BAD */
  render (h) {
    if (foo) {
      return h('div', 'hello')
    }
  }
}
</script>

Further Reading