@@ -11,7 +11,6 @@ import {
1111import { Store } from '../reducers'
1212
1313type OwnProps = {
14- label :string
1514}
1615
1716type ConnectedState = {
@@ -65,15 +64,25 @@ class CounterComponent extends React.Component<ConnectedState & ConnectedDispatc
6564}
6665
6766render ( ) {
68- const { counter, label, isSaving, isLoading, error} = this . props
69- return < form >
70- < legend > { label } </ legend >
71- < pre > { JSON . stringify ( { counter, isSaving, isLoading} , null , 2 ) } </ pre >
72- < button ref = 'increment' onClick = { this . _onClickIncrement } > click me!</ button >
73- < button ref = 'save' disabled = { isSaving } onClick = { this . _onClickSave } > { isSaving ?'saving...' :'save' } </ button >
74- < button ref = 'load' disabled = { isLoading } onClick = { this . _onClickLoad } > { isLoading ?'loading...' :'load' } </ button >
75- { error ?< div className = 'error' > { error } </ div > :null }
76- </ form >
67+ const { counter, isSaving, isLoading, error} = this . props
68+ return < div >
69+ < div className = 'hero' >
70+ < strong > { counter . value } </ strong >
71+ </ div >
72+ < form >
73+ < button ref = 'increment' onClick = { this . _onClickIncrement } > click me!</ button >
74+ < button ref = 'save' disabled = { isSaving } onClick = { this . _onClickSave } > { isSaving ?'saving...' :'save' } </ button >
75+ < button ref = 'load' disabled = { isLoading } onClick = { this . _onClickLoad } > { isLoading ?'loading...' :'load' } </ button >
76+ { error ?< div className = 'error' > { error } </ div > :null }
77+ < pre >
78+ { JSON . stringify ( {
79+ counter,
80+ isSaving,
81+ isLoading,
82+ } , null , 2 ) }
83+ </ pre >
84+ </ form >
85+ </ div >
7786}
7887}
7988