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

Bonus feature: API call refactor #9

Open
Fleury14 opened this issue Jan 24, 2023 · 0 comments · May be fixed by rpheredia/react-challenge-project-jan-2023#9
Open

Bonus feature: API call refactor #9

Fleury14 opened this issue Jan 24, 2023 · 0 comments · May be fixed by rpheredia/react-challenge-project-jan-2023#9

Comments

@Fleury14
Copy link
Collaborator

This bonus request should be tackled after completing #8 . As such, it is recommended that you branch off the code submitted for that pull request to complete this issue. This task aims to target applicants with stronger knowledge of both Redux and general React structure, therefore is considered an extra credit "bonus".

Current functionality

API calls are currently being handle in components that have other concerns; For example, the API call for submitting an order is handled inside the order form. Ideally, we want each component to have only one concern. If this application was to add even more features, we would run into difficulty debugging a component that is responsible for so many tasks.

Desired functionality

Fortunately, Redux can accommodate us. The axios package is already installed; refactor the code to leverage Redux to handle our API calls, and store the results inside Redux so any component can have access to them, and adjust the components accordingly.

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

Successfully merging a pull request may close this issue.

1 participant