You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: step-04/README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ Add to `<Main>`
52
52
53
53
## 2. Load User Attributes
54
54
55
-
We call `Auth.userAttributes` to load attributes. Since we get `user`object from `<Main>` which could be from constructing `<Profile>` component or updating, so we treat both `componentDidMount` and `componentDidUpdate`
55
+
We call `Auth.userAttributes` to load attributes. `user`is a property of `<Profile>` component. It may change after mount, so we need to listen to `componentDidUpdate` as well as `componentDidMount`
56
56
57
57
```javascript
58
58
componentDidMount() {
@@ -65,7 +65,7 @@ We call `Auth.userAttributes` to load attributes. Since we get `user` object fro
65
65
}
66
66
}
67
67
68
-
loadAttributes() {
68
+
loadProfile() {
69
69
const { user } =this.props;
70
70
Auth.userAttributes(user)
71
71
.then(data=>this.loadSuccess(data))
@@ -122,7 +122,7 @@ We call `Auth.userAttributes` to load attributes. Since we get `user` object fro
122
122
}
123
123
```
124
124
125
-
To keep simple we just cover 'given_name' and 'family_name', which are from 'standard attributes' from Cognito:
125
+
To keep simple we just cover 'given_name' and 'family_name', which are in 'standard attributes' list from Cognito:
126
126
[Configuring User Pool Attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html)
0 commit comments