Skip to content

Commit 56cea09

Browse files
authored
docs(render-props): examples improvement suggestion (#987)
1 parent 98d8c10 commit 56cea09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/docs/render-props.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MouseTracker extends React.Component {
4141

4242
render() {
4343
return (
44-
<div style={{ height: '100%' }} onMouseMove={this.handleMouseMove}>
44+
<div style={{ height: '100vh' }} onMouseMove={this.handleMouseMove}>
4545
<h1>Move the mouse around!</h1>
4646
<p>The current mouse position is ({this.state.x}, {this.state.y})</p>
4747
</div>
@@ -74,7 +74,7 @@ class Mouse extends React.Component {
7474

7575
render() {
7676
return (
77-
<div style={{ height: '100%' }} onMouseMove={this.handleMouseMove}>
77+
<div style={{ height: '100vh' }} onMouseMove={this.handleMouseMove}>
7878

7979
{/* ...but how do we render something other than a <p>? */}
8080
<p>The current mouse position is ({this.state.x}, {this.state.y})</p>
@@ -127,7 +127,7 @@ class MouseWithCat extends React.Component {
127127

128128
render() {
129129
return (
130-
<div style={{ height: '100%' }} onMouseMove={this.handleMouseMove}>
130+
<div style={{ height: '100vh' }} onMouseMove={this.handleMouseMove}>
131131

132132
{/*
133133
We could just swap out the <p> for a <Cat> here ... but then
@@ -183,7 +183,7 @@ class Mouse extends React.Component {
183183

184184
render() {
185185
return (
186-
<div style={{ height: '100%' }} onMouseMove={this.handleMouseMove}>
186+
<div style={{ height: '100vh' }} onMouseMove={this.handleMouseMove}>
187187

188188
{/*
189189
Instead of providing a static representation of what <Mouse> renders,

0 commit comments

Comments
 (0)