You define a context in React Native by using the createContext() function provided by React. This function creates a new context object that can be used to pass data to descendant components.