Social Network for Pets react part II

Hi members of codecademy community in the task 7 when i try to make the variable friends like i did in the last steps the application didn’t work like expected to work.
[https://www.codecademy.com/paths/full-stack-engineer-career-path/tracks/fscp-react-part-ii/modules/fecp-lifecycle-methods/projects/react-lifecycle-methods-social-network-for-pets]
and this is my clipboard
`import React from ‘react’;
import { fetchUserData, cancelFetch } from ‘./dataFetcher’;
import { Userlist } from ‘./Userlist’;

export class Profile extends React.Component {
constructor(props) {
super(props);
this.state = {userData: “Dolf”}
}
loadUserData() {

this.setState({userData: null});

this.fetchID = fetchUserData(this.props.username, (userData) => {

this.setState({ userData });
});
}
componentDidMount() {
this.loadUserData()
}
render() {
let name;
let bio;
let friends;
let isLoading = false;
if(isLoading) {
name = ‘Loading…’
bio = 12
friends = ;
} else {
name = this.state.userData.name;
bio = this.state.userData.bio;
friends = this.state.userData.friends;
}

if(this.state.userData === null) {
isLoading = true;
}
let className = ‘Profile’;
if (isLoading) {
className += ’ loading’;
}

return (
  <div className={className}>
    <div className="profile-picture"></div>
    <div className="profile-body">
      <h2>{name}</h2>
      <h3>@{this.props.username}</h3>
      <p>{bio}</p>
      <h3>My friends</h3>
      <Userlist usernames={friends} onChoose={this.props.onChoose} />
    </div>
  </div>
);

}
}`

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.