File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class HomeScreen extends React.Component {
25
25
The weather temperature is: { this . props . temperature }
26
26
</ Text >
27
27
< Text style = { styles . instructions } > { this . props . isHot ? "It's pretty hot!" : '' } </ Text >
28
- < Text style = { styles . instructions } > { this . props . errorMessage } </ Text >
28
+ < Text style = { styles . instructions } > { this . props . temperatureErrorMessage } </ Text >
29
29
< Button onPress = { this . props . fetchTemperature } title = "Refresh" />
30
30
</ View >
31
31
)
@@ -51,12 +51,12 @@ const styles = StyleSheet.create({
51
51
52
52
HomeScreen . propsTypes = {
53
53
temperature : PropTypes . number ,
54
- errorMessage : PropTypes . string ,
54
+ temperatureErrorMessage : PropTypes . string ,
55
55
}
56
56
57
57
const mapStateToProps = ( state ) => ( {
58
58
temperature : state . example . get ( 'temperature' ) ,
59
- errorMessage : state . example . get ( 'errorMessage ' ) ,
59
+ temperatureErrorMessage : state . example . get ( 'temperatureErrorMessage ' ) ,
60
60
isHot : isHot ( state ) ,
61
61
} )
62
62
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ import { Map } from 'immutable'
5
5
*/
6
6
export const INITIAL_STATE = Map ( {
7
7
temperature : null ,
8
- errorMessage : null ,
8
+ temperatureErrorMessage : null ,
9
9
} )
Original file line number Diff line number Diff line change @@ -8,16 +8,16 @@ import { ExampleTypes } from './Actions'
8
8
export const updateTemperature = ( state , { temperature } ) =>
9
9
state . merge ( {
10
10
temperature : temperature ,
11
- errorMessage : null ,
11
+ temperatureErrorMessage : null ,
12
12
} )
13
13
14
14
/**
15
- * Example of a reducer that updates the `errorMessage ` property.
15
+ * Example of a reducer that updates the `temperatureErrorMessage ` property.
16
16
*/
17
17
export const showErrorMessage = ( state , { errorMessage } ) =>
18
18
state . merge ( {
19
19
temperature : '??' ,
20
- errorMessage : errorMessage ,
20
+ temperatureErrorMessage : errorMessage ,
21
21
} )
22
22
23
23
/**
You can’t perform that action at this time.
0 commit comments