Reactjs: Key undefined when accessed as a prop

前端 未结 3 855
抹茶落季
抹茶落季 2020-12-31 06:19

Tools: Reactjs 0.14.0 Vanilla Flux

I need unique identifiers for 2 reasons:

  1. Child Reconciliation
  2. Keeping track of what child
3条回答
  •  失恋的感觉
    2020-12-31 06:34

    It is best to use id. Then in the eventHandler you can have event.target.id.

    function getMessageListItem(message) {
    
      return (
        
      );
    }

提交回复
热议问题