Skip to content

PRA#01_React-LuisLopez-ComponentsFrontendDevelopment - #18

Open
Luiscuatro wants to merge 2 commits into
AlbertProfe:frontend-reactfrom
Luiscuatro:PRA01-LuisLopez
Open

PRA#01_React-LuisLopez-ComponentsFrontendDevelopment#18
Luiscuatro wants to merge 2 commits into
AlbertProfe:frontend-reactfrom
Luiscuatro:PRA01-LuisLopez

Conversation

@Luiscuatro

Copy link
Copy Markdown

Implementation Notes

Changes Made

  • Updated the Postman Mock Server URL in data-api.js.
  • Implemented API call in Practice.jsx using fetchWords().
  • Added useEffect() in Practice.jsx to fetch and store data in state.
  • Passed words as a prop to the Cards component.

What I Don't Understand

Postman Mock Server

  • How Postman mock servers actually work. I set up an example, but I still don’t get why the response doesn’t return the expected JSON.
  • Why even after creating an example response, the request doesn’t return any data.
  • How Postman determines which response to send when there are multiple examples.
  • What I might have done wrong when setting up the mock server.

API & Axios

  • How Axios interacts with the mock server and why it needs specific configurations.
  • How API requests are managed efficiently in React.
  • Why React re-renders when state updates and how it affects API calls.
  • The best way to handle errors when fetching data.

React & State Management

  • How useEffect() works properly (especially dependencies and execution flow).
  • The interaction between useState() and useEffect() when dealing with API requests.
  • How the Cards component receives and renders data.
  • How React processes and updates fetched data.

Additional Notes

  • The mock server is technically set up, but it does not return JSON even though an example was created.
  • I dont know the request-response cycle is working correctly.
  • Most of the code was the one already implemented.
  • Screenshots of the Postman setup are included for review.

image
image

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