我正在使用 React.js 和 Reflux 开发 Chrome 扩展程序。现在,当使用一个回调更新商店时,我需要通知扩展的所有部分有关更改的信息。
就像是:
function(newStore){
chrome.runtime.sendMessage({action: 'updateStore', store: newStore});
}
Reflux 中添加此类回调的意义在哪里?
我正在使用 React.js 和 Reflux 开发 Chrome 扩展程序。现在,当使用一个回调更新商店时,我需要通知扩展的所有部分有关更改的信息。
就像是:
function(newStore){
chrome.runtime.sendMessage({action: 'updateStore', store: newStore});
}
Reflux 中添加此类回调的意义在哪里?