Browse Source

Add a defaultValue for context example

main
Dan Abramov 7 years ago
committed by GitHub
parent
commit
e32847f030
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      examples/context/multiple-contexts.js

4
examples/context/multiple-contexts.js

@ -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() {

Loading…
Cancel
Save