Task: Detail View
Task: Detail View
Create a detail-view component, that renders a detailed view of a post
Only use function-components
The detail-view should contain: the title, the category, the avatar (picture), the body, the first- and last name + e-mail-address, the created-at date.
Render the comments associated with that post (all data on the comment should be visible, except the id).
If the id is not found, show a message that the post could not be found
Add a means of "going back" or going to the List-view inside the detail view.
Create a route that renders the detail-view ONLY when the EXACT path matches
The route's path should be "/:id" or comparable.
Rather than passing the detail-view's data around, request the detail view's data upon loading the detail-view (there is a specific route on the server for this)
Use Redux for storing a detailed post (make a separate reducer for this)
Ask another trainee for a review
Process any feedback you get (only if you agree with the feedback)
Finished? Ask me for a review
Please do not continue until I have finished my review
Last updated
Was this helpful?