React JS-module-7 Question 5

Last Updated :
Discuss
Comments

How do you create a context in React?

By using the `useState` hook

By defining a class component

By using the `createContext` function from React

By importing it from a third-party library like Redux

Share your thoughts in the comments