I have chrome extension with reactjs.
My component has some internal functions and I called them after callback of chrome.storage.sync.get.
But I got "XXX is not function" error.
Here is my code snippet.
class App extends React.Component {
func1(){}
func2() {
chrome.storage.sync.get(null, function(data) {
this.func1();
this.setState(...);
})
}
}
I can't call func1.