DEV Community

Discussion on: ⚛️ 🚀 React Component Patterns

Collapse
 
hatrunghung profile image
Ha Trung Hung

Actually the purpose of useDogProviderState is to make sure that the consumer of the DogDataProviderContext will be under the DogDataProvider in the React tree in order to consume the value provided from the provider. They would not want something like: const App = () => <Profile /> :D
Actually there's a discussion about this on Twitter: twitter.com/kentcdodds/status/1125...