Closed fatimaahmed14 closed 1 year ago
I am assuming you'll be using utils/client.js
to send requests.
Can you detail the ENDPOINTS and example PAYLOAD to be sent to the API for a) creating a comment; b) editing a comment?
Where will the state for the comments be stored? Where is CommentList being instantiated?
Where will the state for the comments be stored? I don't know if you have seen but we have said above in the issue , the the comments state will be stored within the Post's state
Comments JSX template has been created, ready to receive functionality.
Comments are now displaying under posts. We will need the actual post component to be ready to be able to plug the real comments into but it should be fairly straightforward.
Editing and deleting comments have been implemented: https://www.youtube.com/watch?v=qSNZywr4jgo
Requirements
Post comments
UI Approach
Code structure
Comments.js
file in the folder:/src/components/Comments
style.css
in the same folder<Comment>
component will be instantiated in the<CommentsList>
component where we map for eachcomment
. Thecomments
are fetched withclient.js
from the API on component load.CommentsList
component will be instantiated in thePost
componentWireframe
client.js
) specifying the content of the comment and data in regard to time of the comment and user who sent request to commentclient.js
) sent to the APIclient.js
) sent to the API