The vue render function return (<li> </li>) reports an error

I"m going to take out some components in the npm package to study.
then copy it out and introduce it. As a result,
the code in some packages looks like this:

 render() {
      return (
        <div class={portalTargetClass} style={portalTargetStyle} data-instance-id={instance.getInstanceId()}>
          <Menu ref="menu" />
        </div>
      )
    },

after packing, return reports an error here

Syntax Error: Unexpected token

but why don"t you report an error in the npm package? How should I change it?

May.04,2022

what you need is JSX Refer to the official website document: ide/render-function.html-sharpJSX" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide...
JSX details reference: https://github.com/vuejs/babe...


how do I feel this is a component of react ?


The

render method returns the createElement function to generate a template in createElement

render (createElement) {
    return createElement(
      'div',
      {
        class: portalTargetClass,
        style: portalTargetStyle
      }
    )
  }

how do you pack it? is the relevant babel plug-in not equipped with

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb1a8b-4812a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb1a8b-4812a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?