scrimba
Redux Fundamentals With React
Dispatching Actions Through Components
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

Dispatching Actions Through Components
AboutCommentsNotes
Dispatching Actions Through Components
Expand for more info
App.js
run
preview
console
import React from 'react'
import { useSelector } from 'react-redux'

function App() {
const rooms = useSelector(state => state.rooms)
return (
<>
<div className="home-image"></div>
<h1>Let's learn about homes!</h1>
<ul>
{rooms.map(room => (
<li key={room.id}>{room.type}</li>
))}
</ul>
</>
)
}

export default App
Console
/index.html
-8:30