This commit is contained in:
Brian Vaughn
2018-03-29 09:18:46 -07:00
parent 691cd4577c
commit 032576cf7b
2 changed files with 6 additions and 2 deletions

View File

@@ -4,7 +4,9 @@ class Example extends React.Component {
renderValue = value => {
return (
<div>
Context value:{value}. Props value:{this.props.counter}
Context value:{value}. Props value:{
this.props.counter
}
</div>
);
};

View File

@@ -6,7 +6,9 @@ class Example extends React.Component {
<Ctx.Consumer>
{value => (
<div>
Context value:{value}. Props value:{this.props.counter}
Context value:{value}. Props value:{
this.props.counter
}
</div>
)}
</Ctx.Consumer>