title: React Native Navigation / Context API
body: <p>I'm using React-Native-Navigation with the Context api.</p>
  
  <p>I'm wrapping my screens with a HOC component below.</p>
  
  <pre><code>  const ProviderWrap = Comp =&gt; props =&gt; (
      &lt;Provider&gt;
        &lt;Comp {...props} /&gt;
      &lt;/Provider&gt;
    );
  
  Navigation.registerComponent('app.AuthScreen', () =&gt; ProviderWrap(AuthScreen));
  Navigation.registerComponent('app.FindPlaceScreen', () =&gt; ProviderWrap(FindPlaceScreen));
  Navigation.registerComponent('app.SharePlaceScreen', () =&gt; ProviderWrap(SharePlaceScreen));
  </code></pre>
  
  <p>And this is my Provider Component</p>
  
  <pre><code>class Provider extends Component {
    state = {
      placeName: 'hello',
      image: 'https://images.unsplash.com/photo-1534075786808-9b819c51f0b7?ixlib=rb-0.3.5&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;s=4dec0c0b139fb398b714a5c8264b4a9a&amp;auto=format&amp;fit=crop&amp;w=934&amp;q=80',
      places: [],
    }
  
    textInputHandler = (text) =&gt; {
      this.setState({
        placeName: text,
      })
    }
  
    searchInputHandler = (text) =&gt; {
      const SearchedPlace = this.state.places.filter(place =&gt; {
        return place.name.includes(text)
      })
      this.setState(prevState =&gt; {
        return {
          places: SearchedPlace,
        }
      })
    }
  
    placeSubmitHandler = () =&gt; {
      if (this.state.placeName) {
        this.setState(prevState =&gt; {
          return {
            places: [...prevState.places, {
              name: prevState.placeName,
              image: prevState.image,
            }],
            placeName: '',
          }
        })
      } else {
        return;
      }
    }
  
    placeDeleteHandler = (id, deleteModal) =&gt; {
      const newPlaces = this.state.places.filter((place, index) =&gt; {
        return index !== id
      })
      this.setState({
        places: newPlaces,
      })
      deleteModal();
    }
  
    render() {
      return (
        &lt;GlobalContext.Provider value={{
          state: this.state,
          textInputHandler: this.textInputHandler,
          placeSubmitHandler: this.placeSubmitHandler,
          placeDeleteHandler: this.placeDeleteHandler,
          searchInputHandler: this.searchInputHandler,
        }}&gt;
          {this.props.children}
        &lt;/GlobalContext.Provider&gt;
      )
    }
  }
  </code></pre>
  
  <p>My issue is that The Context state isnt shared between screens. in my context state i have a places array which i add to in the  SharePlaceScreen which works fine but when i go over to FindPlaceScreen that context state places is empty. As if i had two separate context for each screen.</p>