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

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

xxx={value ? 1 : 0}

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

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

posted @ 2018-10-20 17:00  全玉  阅读(6058)  评论(0编辑  收藏  举报