Created
March 28, 2018 12:28
-
-
Save devalexandre/0d30f5ad5c805c423c3fbe93d3d187de to your computer and use it in GitHub Desktop.
contador.js 9:11 error Expected an assignment or function call and instead saw an expression no-unused-expressions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { AppContext } from '../context/app'; | |
class Contador extends Component { | |
render() { | |
return ( | |
<AppContext.Consumer> | |
{context => { | |
<div> | |
<p>contador : {context.state.count}</p> | |
<button onClick={context.incrementState}>increment</button> | |
</div>; | |
}} | |
</AppContext.Consumer> | |
); | |
} | |
} | |
export default Contador; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment