在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5  數(shù)據(jù)庫  HTML/ react報錯求解!

react報錯求解!

Warning: Encountered two children with the same key, `.$4`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
    in ul (created by DOMWrap)
    in DOMWrap (created by Menu)
    in Provider (created by Menu)
    in Menu (created by Menu)
    in Menu (created by Left)
    in div (created by Sider)
    in div (created by Sider)
    in Sider (created by Left)
    in Left (created by Main)
    in div (created by BasicLayout)
    in BasicLayout (created by Adapter)
    in Adapter (created by Main)
    in Main (created by Connect(Main))
    in Connect(Main) (created by Route)
    in Route
    in Switch
    in Router
    in Provider
    in Unknown
    
    
    以上為react錯誤代碼,求解!    
    
    
   問題以解決  把Key的值修改下就可以了    
回答
編輯回答
愿如初

你用了同一個key:‘.$4’,key是標識,不能重復

2017年12月6日 11:14
編輯回答
柚稚

看到類似很多的問題,為什么不讀這些信息呢?是英文看不懂,還是什么原因呢。
我英語體育老師教的,也能猜個大概。

2017年10月7日 04:06
編輯回答
晚風眠

這是warning不是error,原因來自于你遍歷渲染了一個數(shù)組的元素,然后有元素的key是相同的。

2018年6月21日 15:49