Guest User

Untitled

a guest
Sep 9th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. class App extends Component {
  2. //나머지 부분은 같습니다.
  3. render() {
  4. const { profiles } = this.state;
  5. return (
  6. <div className="App">
  7. {profiles ? this._renderProfile() : "nothing"}
  8. </div>
  9. );
  10. }
  11. _renderProfile = () => {
  12. const { profiles } = this.state;
  13. const renderProfiles = profiles.map((profile, index) => {
  14. return (
  15. <Profile
  16. imgSrc={profile.picture.large}
  17. name={profile.name.first}
  18. username={profile.login.username}
  19. password={profile.login.password}
  20. />
  21. )
  22. })
  23. return renderProfiles;
  24. }
  25. }
Add Comment
Please, Sign In to add comment