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

文章来自:https://www.cnblogs.com/mengff/p/9822272.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3