mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
Add a defaultValue for context example
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
const ThemeContext = React.createContext('light');
|
||||
|
||||
// Signed-in user context
|
||||
const UserContext = React.createContext();
|
||||
const UserContext = React.createContext({
|
||||
name: 'Guest'
|
||||
});
|
||||
|
||||
class App extends React.Component {
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user