Task: List view
Task: List View
Clone the following repository on github: https://github.com/rnitschelm/Assignment
Follow the instructions in the README
Once the server is up and running, go back to your front-end
Create a "home"-page in which a list-view of posts/messages can be rendered. Please do not use class-components for this.
Set-up a HTTP-client to fetch posts from the server you just cloned
Use a useEffect-hook when fetching posts
Store the posts in the component's state using a useState-hook.
Render a total of 50 messages, fetched in 1 run
For each message, render the title, the first-name and the date of creation in a human readable format (use a function for formatting this)
Install Jest
Install Testing Library (React)
Test the formatting function
The list of messages should contain 50 messages at any given time
Test the List of messages with Testing Library
If you run into trouble with the server, please let me know (I'm sorry for treating you guys as guinea pigs :P)
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?