Skip to content

checking in homework#7

Open
tthaman wants to merge 1 commit into
frontend-application-development-uw20:masterfrom
tthaman:complete-exercises
Open

checking in homework#7
tthaman wants to merge 1 commit into
frontend-application-development-uw20:masterfrom
tthaman:complete-exercises

Conversation

@tthaman
Copy link
Copy Markdown

@tthaman tthaman commented May 20, 2020

…ast homepage it was on

Week 5 HW Submission

Please fill out the information below in order to complete your assignment. Feel free to update this comment later if necessary.

  • Comfort rating on this assignment (1-5): 1|2|3|4|5
  • Completion rating on this assignment: complete|incomplete

@tthaman tthaman changed the title checking in homework--couldn't get the detail page to return to the l… checking in homework May 20, 2020
@tthaman
Copy link
Copy Markdown
Author

tthaman commented May 20, 2020

Couldn't get the detail page to return to the correct page, unless the character is on the first page

const [name, setName] = useState('');
const [birthyear, setBirthyear] = useState('');

let {idx} = useParams();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I might use something besides idx, maybe id?


fetch(homeworldUrl)
.then(res => res.json())
.then(data => setHomeworld(data.name));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would drop a catch in here, just in case...

starships: PropTypes.array,
created: PropTypes.string,
edited: PropTypes.string,
url: PropTypes.string,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! No one else used propTypes 😹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants