Context is used to share data which can be considered “global” for React components tree and use that data where needed, such as the current authenticated user, theme, etc . For example, in the below code snippet, we manually thread through a “theme” prop to style the Button component.