I didn't found any place on the official react native doc where they talk about the concept of contexts , createContext, .Provider, etc. But I don't know if react.JS context work also in react native. Does it ?
Asked
Active
Viewed 44 times
-2
-
1Yes it works the same, just try it out. Just like you can hooks and other features from react. It's not really necessary for the react native docs to go into these topics since the react docs already describe it. For the differences between react and react native read this: https://stackoverflow.com/questions/34641582/what-is-the-difference-between-react-native-and-react. – 5eb Aug 14 '20 at 12:03
1 Answers
0
Yes you can because The React Context API lets you avoid passing props from a parent to child at every level of the component tree. It allows you to add global state to the app. React Native doesn't have docs on these as it is already described in React.

Nqobile Ndlovu
- 11
- 4