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.
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
axiospackage 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.