码迷,mamicode.com
首页 > 其他好文 > 详细

Warning: Received `false` for a non-boolean attribute `xxx`.

时间:2018-10-20 17:28:20      阅读:3524      评论:0      收藏:0      [点我收藏+]

标签:问题   react   for   reac   attr   git   value   receive   识别   

React对boolean类型的attribute的识别方式问题,可以采用以下方法解决:

xxx={value ? 1 : 0}

改成数字的写法,不用布尔值。

具体可以参考:https://github.com/styled-components/styled-components/issues/1198

Warning: Received `false` for a non-boolean attribute `xxx`.

标签:问题   react   for   reac   attr   git   value   receive   识别   

原文地址:https://www.cnblogs.com/mengff/p/9822272.html

(2)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!