後面要講到的react-redux就是通過Context讓各個子元件拿到store中的資料的。 ... getState(); // 獲取資料store.dispatch({type: 'ADD_TODO'}); ...
確定! 回上一頁