scrimba
Redux Fundamentals With React
Working With Async Data
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

Working With Async Data
AboutCommentsNotes
Working With Async Data
Expand for more info
App.js
run
preview
console
import React, { useState } from 'react'
import { useSelector, useDispatch } from 'react-redux'

function App() {
const dispatch = useDispatch()
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>
<p>The temperature outside is: 28 deg C</p>
</>
)
}

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