React如果children中直接跟随文本的情况下会出现 Warning: Received true
for a non-boolean attribute
#3754
Open
4 tasks done
Labels
UnoCSS version
0.59.4
Describe the bug
环境
vite: 5.2.0
react: 18.2.0
unocss: 0.59.4
typescript: 5.2.2
配置
vite.config.ts
uno.config.ts
shimi.d.ts
页面代码
main.tsx
index.css
App.tsx
现象
当前的这个代码,导致的结果是没有样式并且浏览器提示警告
react-dom_client.js?v=05878dec:519 Warning: Received
true
for a non-boolean attributewh-full
.react-dom_client.js?v=05878dec:519 Warning: Received
true
for a non-boolean attributebg-gray-300
.但是如果我将App.tsx的代码改成
样式是正常且浏览器不报错
但是如果将App.tsx的代码改为
之后又会提示异常
Reproduction
代码已经在上面提供了
通过pnpm create vite创建的React的基础脚手架
System Info
环境
vite: 5.2.0
react: 18.2.0
unocss: 0.59.4
typescript: 5.2.2
pnpm create vite 选则React
Validations
The text was updated successfully, but these errors were encountered: