Open cmlooff opened 2 years ago
Discussing with Anthony, we want to separate Postcreator's function from rendering data received from the database. PostCreator now should only make HTTP Post to database and receive 200 code back from database on success. We will handle HTTP Get using a different component.
Was able to add an event handler for our submit button, able to pull the values out of the event object- working on making post to the backend now
9/18 Prop drilled the closePostCreator from Post Container down into PostCreator so that submit and cancel buttons will close the modal for PostCreator
9/19 Spent a significant amount of time troubleshooting why our post request body was coming into the backend as an empty object. Was able to resolve by removing the localhost:3000 pre-fix from the fetch request. Did not need Allow CORS.
Link: PostCreator.jsx
Communicate with the Server
Frontend Flowchart