← React Intermediate Questions - Set 1 Q4

What are React context and when would you use it?

React Intermediate Questions - Set 1

Example

const AuthContext = createContext(null);
<AuthContext.Provider value={{ user, login, logout }}>…</AuthContext.Provider>

What to notice

← Back to the question list