Filtering A List With React

后端 未结 4 1452
不知归路
不知归路 2021-02-13 18:55

Hmm, I don\'t see my omission, but I get a blank page with a console error saying:

Users.js:9 Uncaught TypeError: Cannot read property \'filter\' of undefined
           


        
4条回答
  •  醉酒成梦
    2021-02-13 19:39

    I think that you are trying to filter the atribute, and not the list. Try to change this:

    this.props.list.friend.filter
    

    to this:

    this.props.list.filter
    

提交回复
热议问题