Welcome to my personal website project! This repository contains the code for a simple web application that displays blogs, allows adding new blogs, and deleting them. Built with React and powered by a local JSON server, it showcases fundamental concepts like state management, fetching data, and routing.
- Display Blogs: View a list of all blogs with their titles, content, and authors.
- Add Blogs: Submit a new blog with a title, body, and author selection.
- Delete Blogs: Remove an existing blog from the list.
- Blog Details: View detailed content for each blog.
- Custom Hooks: Fetch data using a custom React hook (
useFetch).
- React - Frontend UI Library
- React Router - For routing between pages
- JSON Server - Backend for data storage
- CSS - Styling the components
To get a local copy up and running, follow these steps:
Ensure you have Node.js installed.
- Clone the repository:
git clone https://github.com/chonghow97/my-website.git
- Navigate to the project directory:
cd my-website - Install dependencies:
npm install
- Run the React application:
npm start
The app should now be running at http://localhost:3000.
src/- Contains the main React components and custom hooks.data/- Contains the local JSON file for storing blog data.
If you'd like to contribute, feel free to fork the repository and submit a pull request. Contributions and improvements are always welcome.
This project is licensed under the ISC License - see the LICENSE file for details.