前端踩坑(六)--------------------------react父組件調用子組件方法

react父組件調用子組件方法 前期咱們說了父子組件互相經過props傳遞數據的方法,這個應該均可以理解. 其實今天說的這個 父組件直接調用子組件方法, 也相似. 先看代碼,比較直觀.react import React, {Component} from 'react'; export default class Parent extends Component { render()
相關文章
相關標籤/搜索