title: testing react-redux useSelector
body: <p>I have a react application which uses react-redux, useSelector to get data from the store. 
  The react component has </p>
  
  <pre><code>function PersonDataView() {
    const name= useSelector(state =&gt; state.data.name)
    const dob= useSelector(state =&gt; state.data.dob)
    const dispatch = useDispatch()
    const show= () =&gt; dispatch({type: 'SHOW'})
    const remove= () =&gt; dispatch({type: 'REMOVE'})
    return (
      &lt;div&gt;
        &lt;h2&gt;Person Details&lt;/h2&gt;
       &lt;div&gt;
        &lt;button onClick={show}&gt;Show&lt;/button&gt;
        &lt;span aria-label="name"&gt;{name}&lt;/span&gt;
        &lt;span aria-label="dob"&gt;{dob}&lt;/span&gt;
        &lt;button onClick={remove}&gt;Remove&lt;/button&gt;
       &lt;/div&gt;
     &lt;/div&gt;
    )
  }
  </code></pre>
  
  <p>I am using react-testing-library to test this component. Is there any API which makes testing these components easier for us. I know two ways of testing these: 
  1) I can mock the store using redux-mock-store and then wrap this component under provider component. 
  2) mock the useSelector method in jest</p>
  
  <pre><code>jest.mock('react-redux', () =&gt; ({
    useSelector: () =&gt; ({
    })
  });
  </code></pre>
  
  <p>But the problem using jest mock is in case of multiple selector, all the useSelectors will return same mocked value. 
  Using jest way of mocking, jest.fn().mockReturnValueOnce() doesn't look correct to me. </p>