title: context state does not update
body: <p>i am new to context api, I tried updating the context state by sending a dispatch to the reducer, but when i log the state, i get the default state. however when i inspected inside the react dev tools, i found the the state does have a changed state, but it's just not logging it out in the console, am i doing something wrong?</p>
  <pre><code>const State = ({ children }) =&gt; {
  const initState = {
      trending: [],
      search: []
  }
  const [state, dispatch] = useReducer(Reducer, initState)
  
  useEffect(() =&gt; {
      console.log(state.trending) //returns []
      dispatch({ type: 'LOAD_TRENDING', payload: ['some Data'] })
      console.log(state.trending); // returns [] instead of ['some Data']
      },
   [])}
  </code></pre>
  <p><img src="https://i.stack.imgur.com/CctBR.png" alt="React developer tools inspect screenshot" /></p>