Skip to content

Commit dede6c3

Browse files
committed
fix jsbin?
1 parent 062d0db commit dede6c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

react-state/8.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Working with component state typically involves setting a components default sta
44

55
In the code example below I am creating a `<MoodComponent />` that demonstrates the use of `getInitialState`, `this.state.[STATE]`, and `this.setState()`. If you click on the component in a web browser (i.e., the face) then it will cycle through the states (i.e., moods) available. Thus, the component has three potential states, tied to the UI, based on clicks from the UI user. Go ahead and click on the face in the results tab below.
66

7-
> [source code](https://jsfiddle.net/codylindley/bcrmnL82/#tabs=js,result,html,resources)
7+
> [source code](https://jsfiddle.net/codylindley/zr398avp/#tabs=js,result,html)
88
99
Note that the `<MoodComponent />` has an initial state of ':|', that is set using `getInitialState: function() {return {mood: ':|'};}`, which is used in the component when it is first rendered by writing, `{this.state.mood}`.
1010

0 commit comments

Comments
 (0)