Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored fetch #16

Merged
merged 10 commits into from
Dec 9, 2019
Merged

Refactored fetch #16

merged 10 commits into from
Dec 9, 2019

Conversation

hfaerber
Copy link
Collaborator

@hfaerber hfaerber commented Dec 9, 2019

What's this PR do?

-Breaks out our fetch calls into several individual functions within our method that is invoked on the click of View Characters button.
-Successfully fetches and accesses all the data we need.
-Creates an array of character objects with that data and sets it as state

Where should the reviewer start?

-Walk through the fetch calls within the fetchHandler() method
-Pay attention to what/where we are using return and Promise.all()

-The fetchChar() method was renamed fetchHandler(). This has been updated across App > DisplayContainer > MovieCard. Testing for these components may be affected by this and other changes.

How should this be manually tested?

Uncomment out the initial fetch and walk through the app from Welcome Form through displaying Characters. Characters are display (need css) but the previous data displays while the fetch is processing.

Any background context you want to provide?

What are the relevant tickets?

Issue #14 has been opened to address the UI/UX impact of the delay during fetching
Issue #15 has been opened because we have not yet implemented .catch() or error handling for the fetches

Screenshots (if appropriate)

This shows how the state of App has correctly updated after fetching the data. The issue of the 7th character repeating infinitely is no longer occurring. Only 10 characters are being displayed per the spec.

Screen Shot 2019-12-08 at 8 48 15 PM

@hfaerber
Copy link
Collaborator Author

hfaerber commented Dec 9, 2019

@ckoga Interesting! I created this new branch after getting the fetches to process correctly on your fetch-branch and it shows all the commits including yours from the original branch. I like it!

@ckoga
Copy link
Owner

ckoga commented Dec 9, 2019

Merging now the last commit adds styling to CharacterCards

@ckoga ckoga merged commit c3d1f08 into master Dec 9, 2019
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