score:9

Accepted answer
  • There is some lingering jQuery that can be removed:
    componentDidMount: function() {
      $(document).on("handleCategoryRowClick", this.handleCategoryRowClick);
    },
  • Treat props as immutable as often as possible and React life cycle methods will work as expected. In this case, interests should be state instead of props because the InterestsTable component owns and modifies it; it's not passed in by the component's parent:
    getInitialState: function() {
      return {
        interests: [],
        searchText: ""
      };
    },
    handleCategoryRowClick: function(e, interests) {
      this.setState({
        interests: interests
      });
    },

Related Query

More Query from same tag