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

Lesson 1.8 API request useage #39

Open
royemosby opened this issue Sep 12, 2022 · 0 comments
Open

Lesson 1.8 API request useage #39

royemosby opened this issue Sep 12, 2022 · 0 comments

Comments

@royemosby
Copy link

The instructions have the coder go through the code base and make updates to components based on information coming from the Airtable API. I argue that this is not a best practice. We, as developers, change api services out periodically so should write code that is loosely coupled from our data sources.

The data should be serialized (convert the shape of the data) so that it matches what the application expects. For this specific scenario, a map can convert the response into objects that the code base can already work with.

202209_0809AM-Code

This is much better than going into the TodoListItem and changing the props for title as that component shouldn't care at all about data inbound from an API.

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

No branches or pull requests

1 participant