嗨,我有一个通过 create-react-app 创建的反应项目,当我运行该项目时,通过“styled-jsx”添加的样式有效,但没有作用域,我在控制台中也有这个错误。
收到
true
非布尔属性jsx
我需要测试代码:
import React from "react";
export default function Test() {
return (
<div>
<section>test component
<p>ddd</p>
</section>
<p>
super paragrapth
</p>
<Style/>
</div>
);
}
const Style = () => <style jsx>{`
section {
text-decoration: underline;
font-size: 5em;
}
p {
color: red;
}
`}</style>;
我按照页面https://github.com/vercel/styled-jsx上的示例进行操作,但我看不到如何在不弹出反应项目的情况下添加插件。你能帮我解决一下吗?