Warning: Received `false` for a non-boolean attribute `xxx`.
生活随笔
收集整理的這篇文章主要介紹了
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
總結
以上是生活随笔為你收集整理的Warning: Received `false` for a non-boolean attribute `xxx`.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: element-ui el-radio
- 下一篇: 递归与栈的关系