Geo*_*uer 6 javascript reactjs
jsx 相当于什么
React.createElement('dl', {}, ...errorTermDescriptions(errors))
Run Code Online (Sandbox Code Playgroud)
我试过了
<dl>
{errorTermDescriptions(errors)}
</dl>
Run Code Online (Sandbox Code Playgroud)
这给了我一个关键错误(我知道,我知道,但在这种情况下我真的不想使用密钥)。这是因为它相当于
React.createElement('dl', {}, errorTermDescriptions(errors))
Run Code Online (Sandbox Code Playgroud)
(不扩散)。这不是我想要的
<dl>
{...errorTermDescriptions(errors)}
</dl>
Run Code Online (Sandbox Code Playgroud)
与此同时,webpack 崩溃了
Module parse failed: Unexpected token (377:7)
You may need an appropriate loader to handle this file type.
| __self: _this
| },
| {...errorTermDescriptions(errors)}
| )
| );
Run Code Online (Sandbox Code Playgroud)
这在 javascript 中非常简单,jsx 的等价物是什么?
如果不可能也没关系,我只是想要一个权威的答案。