- cd hacker-news-test
- npm install
- npm run build
- npm run dev / npm run preview; it will launch locally on http://127.0.0.1:3000/
- Displays the last 100 news in a list sorted by date, with the most recent at the top.
- Each news item includes: title, rating, author's nickname, and publication date.
- [ ]Clicking on a news item takes you to the news page (For this task, I've decided that clicking on the news headline will take you to the page with comments on that news, instead there's a link below the headline).
- The news list should automatically update every minute without user intervention.
- There should be a button on the page to forcibly update the news list.
-
Should contain: a link to the news, news headline, date, author, a counter of the number of comments, and a list of comments in tree form.
-
Root comments should be loaded immediately upon entering the page; nested ones should load upon clicking on a root comment.
-
There should be a button on the page to forcibly update the comments list.
-
There should be a button on the page to return to the news list.
-
Technical Requirements
-
The application is developed using React.
-
Usage of TypeScript.
-
Uses the official Hacker News API. (https://github.com/HackerNews/API) Calls to the Hacker News API and data processing from it are made directly from the frontend.
-
Routing is done using React Router V6 (https://reactrouter.com/en/main)
-
Any UI framework is acceptable (for example, MUI). (https://mui.com/)
-
[ ]Pure CSS is also acceptable, the main thing is that it should look nice.
-
The application should run at http://localhost:3000 (http://127.0.0.1:3000/)
-
Page doesn't reload when navigating through links.
-
The source code for the solution should be uploaded from your account on Github (https://github.com/madwizz/hacker-news-test) with a Readme file containing instructions for launching.