React JS: Why is UserContext being displayed undefined in child?

前端 未结 0 1560
清酒与你
清酒与你 2021-01-31 12:21

I am trying to pass data from parent to child using context API.

The parent\'s code:

const UserContext = React.createContext(null)

return(...



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题