title: merge to arrays into one state react-native
body: <p>I have tried a lot of things to get this working. </p>
  
  <p>I have the following 2 stats in my constructor:</p>
  
  <pre><code>constructor(props) {
  super(props);
   this.state = {
     newArray: [],
     dataStorage: [],
   };
  }
  </code></pre>
  
  <p>Then I have a function to handle the parameteres from the TextInputs. I'm creating a new array to add the data and then I want to add it to the existing array.</p>
  
  <pre><code>submitHandler(inputValue, inputIdentifier) {
   console.log('inside the submitHandler');
  
   var newArray = [];
   newArray.push({
    value: inputValue,
    identificer: inputIdentifier.item
   });
   this.setState({newArray: newArray})
  
   let dataStorage = [this.state.newArray, ...this.state.dictionaryForAddedItems]
  
   this.setState({dataStorage: dataStorage})
  
    console.log('her is was inside the newArray' + JSON.stringify(newArray));
    console.log('her is was inside the state.dictionaryForAddedItems' + JSON.stringify(this.state.dataStorage));
  </code></pre>
  
  <p>My logs turn out this way: 
  <a href="https://i.stack.imgur.com/zdFEx.png" rel="nofollow noreferrer">Log in debug looks like this</a></p>