React Context Usage

You want to test a component in react in isolation without wrapping it.

What feature of method React.createContext would be useful for testing if it is used to create a context object?

Options
  1. The use of the defaultValue argument
  2. The ability to pass undefined as a Provider value
  3. The ability to assign contextType property
  4. None of these

Related Posts