Skip to content Skip to sidebar Skip to footer

Why Isn't The State Of Root Component Changing?

This is my Root Component, it passes an array of url details in initial state to tab_list which renders individual tab_item for each url. I am also passing a function to delete the

Solution 1:

You need to call setState in your storage callback

chrome.storage.local.get({urls: []}, function (result) {
      var urls = result.urls;
      urls = urls.filter(function(obj) {
        return obj.id != key;
      });
      this.setState({
        tabs: urls
      });
      chrome.storage.local.set({urls: urls}, function () {});
    }.bind(this));

Post a Comment for "Why Isn't The State Of Root Component Changing?"