# Creating the Context

Share product state in a TypeScript React app by defining a context type, writing a context provider, wrapping components in it, and reading it with useContext.

![Cheat sheet: Creating the Context](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/b2ad252048aa4ad88c4c56479d0bccff.webp)

- Category: React
- Level: Journeyman
- Tags: react
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/using-a-shared-data-context-creating-the-context-cheat-sheet
