https://github.com/alexius-huang/react-server-side-state-management-demo
Demonstration of state mangement using React component local state / SWR and Tanstack React Query
https://github.com/alexius-huang/react-server-side-state-management-demo
Last synced: 3 months ago
JSON representation
Demonstration of state mangement using React component local state / SWR and Tanstack React Query
- Host: GitHub
- URL: https://github.com/alexius-huang/react-server-side-state-management-demo
- Owner: Alexius-Huang
- Created: 2023-02-20T20:52:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-20T22:28:18.000Z (over 2 years ago)
- Last Synced: 2025-01-28T14:39:41.808Z (5 months ago)
- Language: TypeScript
- Size: 200 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# React Server State Management Demo
This project's main purpose is to demonstrate how to perform state management in React, particularly comparing between:
- [x] Using built-in state
- [x] Using [SWR](swr.vercel.app)
- [ ] Using [Tanstack/React Query](https://tanstack.com/query/latest/docs/react/overview)## How to Run?
1. Clone the project:
```bash
git clone [email protected]:Alexius-Huang/react-server-side-state-management-demo.git
```2. Please use the latest stable version of Node, if you have node version manager:
```bash
nvm install latest
```and then use the latest version:
```bash
nvm use
```3. Install by running `yarn` or `npm`.
4. Run the server, simply: `node server.js`
5. Open another terminal session and run the client, run: `yarn start` or `npm run start`
6. Navigate to `http://localhost:3000/`