scrimba
React Bootcamp Course
Challenge: Context Practice 2
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Challenge: Context Practice 2
AboutCommentsNotes
Challenge: Context Practice 2
Expand for more info
App.js
run
preview
console
import React from "react"

import Header from "./Header"
import UserContext from "./userContext"

class App extends React.Component {
static contextType = UserContext

render() {
const username = this.context
return (
<div>
<Header />
<main>
<p className="main">No new notifications, {username}! 🎉</p>
</main>
</div>
)
}
}

export default App
Console
/index.html
-3:17