Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e4e7be3

Browse files
add a snippet for rendering clock demo on day-11 (#66)
1 parent e913c3f commit e4e7be3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎day-11/post.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ class Clock extends React.Component {
167167
}
168168
```
169169

170+
We can now render the clock in a custom format:
171+
172+
```javascript
173+
ReactDOM.render(<Clock format="h:m:s p" />, document.querySelector("#app"));
174+
```
175+
170176
Not only is our `Clock` component _much_ simpler, but it's _so_ much easier to test. It _also_ will help us transition to using a data state tree, like Flux/Redux frameworks, but more on those later.
171177

172178
<div class="demo" id="demo2"></div>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /