The purpose of this exercise is to create a timeline with posts and experiments along with some comments.
-
Install and run the provided server
npm install npm start
or if you are using yarn:
```
yarn
yarn start
```
- Complete all the TO-DOs. Search for 'TO-DO:' to quickly find them. They all live under /src. They are also summarised below:
(a) In
Experiment.js
:- Write some code to show only verified comments (comments have a verified field of type boolean)
- Write some code to show the total number of times the verified comments have been shared (use the timesShared field to calculate the total)
- Append a fullName ( concatenation of first and second name ) field to the author of your verified comments
- Style the comment-bar according to specs
(b) In
Posts.js
: - Write the HTML and CSS to display the post according to specs
(c) In
Navigation.js
: - Fix the code to show the timelines that are associated with the above userId
- Write tests to test your code. An example can be found in '/src/tests/example.test.js'. To run your tests:
npm test
oryarn test
- You should deliver your solution as a
git
repository, preferably hosted on GitHub.
- All css lives under scss. You may use sass/scss styles.
- The specs (designs) can be found under folder /specs. There are 2 views; one for desktop screen and another for mobile. The styling should be close to the designs but it doesn't have to be pixel perfect or use the exact same colors.
- All images needed (icon-edit.svg and icon-user.svg) live under /public
- All data used lives in /src/api/index.js. You can view this file but you can't change the data in it.
- The two things you need to know about React and are different than normal HTML is that instead of using ‘class’ on the html elements you should use ‘className’. Also if you want to use javascript (e.g. to display a variable) in the html you should use curly brackets {} (e.g.
<div>{ user.name }</div> Or <div>{ numberOfComments(user) }</div>
- Correctness
- Readability
- Good code design
You may not use any external libraries