Skip to content

React-app fetching News from HackerNews-API using Axios,TailwindCSS.

Notifications You must be signed in to change notification settings

TheDummyUser/hkernews

Repository files navigation

This is a front-end application that displays top stories from the Hacker News website in a clean and user-friendly format. The application uses React, React Router, and Axios to retrieve and display data from the Hacker News API.

File Structure: The application consists of four components, which are:

App.jsx: This is the root component of the application. It defines the routes for the different pages and contains the navigation bar that allows the user to switch between the pages.

Home.jsx: This component is responsible for displaying the stories on the homepage. It uses the Axios library to fetch data from the Hacker News API and displays the stories in a grid format.

Home.jxs consits of multiple options, top stories, new stories, best stories, ask stories, show stories and so on...

About.jsx: This component provides information about the Hacker News website and its purpose. It also contains a link to the official website.

Dependencies: The application requires the following dependencies to run:


React Router: A library that allows for declarative routing in React applications.

Axios: A promise-based library for making HTTP requests.

Moment: A JavaScript library for manipulating dates and times.

TailwindCSS: A utility-first CSS framework for building responsive and scalable user interfaces. 

How to Run the Application:

To run the application, follow the steps below:

Clone the repository onto your local machine.

Navigate to the project directory and run the following command to install the dependencies:

npm install

Run the following command to start the application:

npm start

Open your web browser and navigate to http://localhost:3000 to view the application.

Conclusion: This application provides a clean and user-friendly interface for browsing top stories and the latest news on the Hacker News website. The use of React, React Router, and Axios make the application efficient and easy to use, while the integration of Moment and TailwindCSS help to enhance the user experience.

Releases

No releases published

Packages

No packages published