scrimba
React Bootcamp Course
Redux in React - mapStateToProps
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

Redux in React - mapStateToProps
AboutCommentsNotes
Redux in React - mapStateToProps
Expand for more info
App.js
run
preview
console
import React from "react"
import {connect} from "react-redux"

function App(props) {
return (
<div>
<h1>COUNT GOES HERE</h1>
<button>-</button>
<button>+</button>
</div>
)
}

export default connect(/* What parts of state do you want? */, /* What actions to dispatch? */)(App)
Console
/index.html
-6:14