title: valid way to update a state property in react?
body: <p>Very new to react so I wanted to check if this is correct. I don't get errors, but just to make sure I'm doing this in the right way.</p>
  <pre><code>state = {
          results: [],
      };
  
  </code></pre>
  <p>This method updates the state upon reach:</p>
  <pre><code>searchRequestHandler = () =&gt; {
          const filterCopy = this.state.filter;
          const dogsCharacteristicsData = dataFromServerModelerUponSearch(
              this.props.dogs
          );
  
          const resultsFromFilter = filterDataResults(
              filterCopy,
              dogsCharacteristicsData
          );
  
          this.setState({ formIsOpen: false, results: [...resultsFromFilter] });
      };
  </code></pre>
  <p>I'm also very curious to know how this could be done with restructuring. Thank you!</p>
  <p>Here is what the data looks in the console for resultsFromFilter variable:</p>
  <p><a href="https://i.stack.imgur.com/46MSG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/46MSG.png" alt="enter image description here" /></a></p>