zoukankan      html  css  js  c++  java
  • react antd Warning: must set key for <rc-animate> children

    实例中,location 有可能是一个‘’,''.split() 将输出[""],是个含有空字符串的数组,而[]是个什么都没有的数组,两者不同。
    code:
    change initialValue from :
    initialValue: location.split(',') || []
    to:
    initialValue: location === '' ? [] : location.split(',')

  • 相关阅读:
    Linux
    Other
    Linux
    VIM
    Linux
    其他
    Win10
    Win10
    IDE
    其他
  • 原文地址:https://www.cnblogs.com/begin256/p/11386309.html
Copyright © 2011-2022 走看看