react簡單組件

效果如圖 代碼如下 //App是父組件 調用Add組件和List組件,所以將Add組件和List組件寫在App的render()進行渲染 //App中的todos數組將會被Add組件和List組件公用,Add組件向todos數組添加數據和List組件將todos數組中的數據展示     class App extends React.Component{         constructor(p
相關文章
相關標籤/搜索