We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
报错地址为: https://github.com/react-component/banner-anim/blob/master/src/BannerAnim.jsx#L102
常规情况下,拿到数组之后会直接
var children = data.map((val,key)=>{<element key={key} />});
在这种情况下直接判断!item.key是不正确的。
!item.key
目前的workaroud是将key变为字符串。这样才正常。
The text was updated successfully, but these errors were encountered:
const children = data.map((val, key) => (<element key={`${key}`} />));
建议不要直接 number。。。。转一下吧。。。
Sorry, something went wrong.
https://facebook.github.io/react/docs/lists-and-keys.html#extracting-components-with-keys 官方建议 key 是转成 string 类型的。。。
明白了,能在error里面提一句么?
No branches or pull requests
报错地址为:
https://github.com/react-component/banner-anim/blob/master/src/BannerAnim.jsx#L102
常规情况下,拿到数组之后会直接
在这种情况下直接判断
!item.key
是不正确的。目前的workaroud是将key变为字符串。这样才正常。
The text was updated successfully, but these errors were encountered: