Skip to content

Commit c2facff

Browse files
authored
Update README.md
1 parent 0d253ca commit c2facff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

step-04/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Add to `<Main>`
5252
5353
## 2. Load User Attributes
5454
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`
5656
5757
```javascript
5858
componentDidMount() {
@@ -65,7 +65,7 @@ We call `Auth.userAttributes` to load attributes. Since we get `user` object fro
6565
}
6666
}
6767

68-
loadAttributes() {
68+
loadProfile() {
6969
const { user } = this.props;
7070
Auth.userAttributes(user)
7171
.then(data => this.loadSuccess(data))
@@ -122,7 +122,7 @@ We call `Auth.userAttributes` to load attributes. Since we get `user` object fro
122122
}
123123
```
124124
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:
126126
[Configuring User Pool Attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html)
127127
128128
## 3. Save User Attributes

0 commit comments

Comments
 (0)