Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class App extends Component {
- //나머지 부분은 같습니다.
- render() {
- const { profiles } = this.state;
- return (
- <div className="App">
- {profiles ? this._renderProfile() : "nothing"}
- </div>
- );
- }
- _renderProfile = () => {
- const { profiles } = this.state;
- const renderProfiles = profiles.map((profile, index) => {
- return (
- <Profile
- imgSrc={profile.picture.large}
- name={profile.name.first}
- username={profile.login.username}
- password={profile.login.password}
- />
- )
- })
- return renderProfiles;
- }
- }
Add Comment
Please, Sign In to add comment