File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "extends": "./node_modules/react-component-template/.eslintrc"
2
+ "extends": "./node_modules/react-component-template/.eslintrc",
3
+ "rules": {
4
+ "react/jsx-sort-props": 0
5
+ }
3
6
}
Original file line number Diff line number Diff line change @@ -35,22 +35,21 @@ const UndoRedo = React.createClass({
35
35
} ,
36
36
37
37
38
- redo ( ) {
38
+ onRedo ( ) {
39
39
this . setValueFromHistory ( this . state . historyIndex + 1 ) ;
40
40
} ,
41
41
42
42
43
- undo ( ) {
43
+ onUndo ( ) {
44
44
this . setValueFromHistory ( this . state . historyIndex - 1 ) ;
45
45
} ,
46
46
47
47
48
48
render ( ) {
49
- const history = this . state . history . map ( ( value , key ) => (
49
+ const history = this . state . history . map ( ( value , key ) =>
50
50
< span className = { css . item } key = { key } >
51
51
{ key === this . state . historyIndex ? < b > "{ value } "</ b > : < span > "{ value } "</ span > }
52
- </ span >
53
- ) ) ;
52
+ </ span > ) ;
54
53
55
54
56
55
return (
@@ -67,11 +66,11 @@ const UndoRedo = React.createClass({
67
66
</ label >
68
67
69
68
< label className = { css . label } >
70
- < button className = { css . input } onClick = { this . undo } > Undo</ button >
69
+ < button className = { css . input } onClick = { this . onUndo } > Undo</ button >
71
70
</ label >
72
71
73
72
< label className = { css . label } >
74
- < button className = { css . input } onClick = { this . redo } > Redo</ button >
73
+ < button className = { css . input } onClick = { this . onRedo } > Redo</ button >
75
74
</ label >
76
75
</ div >
77
76
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import Textarea from './Textarea';
6
6
import css from './App.css' ;
7
7
8
8
9
- const App = ( ) => (
9
+ const App = ( ) =>
10
10
< div className = { css . app } >
11
11
< h1 > react-debounce-input</ h1 >
12
12
< section className = { css . section } >
@@ -28,8 +28,7 @@ const App = () => (
28
28
< h2 > Example 4. Debounced Textarea</ h2 >
29
29
< Textarea />
30
30
</ section >
31
- </ div >
32
- ) ;
31
+ </ div > ;
33
32
34
33
35
34
export default App ;
You can’t perform that action at this time.
0 commit comments