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

Add withData hoc for data fetching #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add withData hoc for data fetching #11

wants to merge 1 commit into from

Conversation

mikeLspohn
Copy link

Fix missing alt prop on img tag warning.

Add withData higher order component for fetching data and injecting response as props. It just takes a url right now so any component that needs to fetch data can just be wrapped in it and passed a url and it will receive data, error, and isLoading props to work with.

This is also pretty much how react-apollo works, which you can use to fetch data from the github graphql api, so this could be a good way to help transition to that if anyone wants to try that out.

…ything needing data from external datasource. Fix missin alt on image tag warning.

fix missing alt on image warning

Fix loading issue
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.

1 participant