Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a9a7495
Setting up React Query
arbor0711 Aug 17, 2023
b205372
Fetching data via React Query
arbor0711 Aug 17, 2023
318aab8
Handling error message in React Query
arbor0711 Aug 18, 2023
2e41c75
Showing a loading indicator or a spinner
arbor0711 Aug 18, 2023
35cd4ac
Create a custom query hook
arbor0711 Aug 18, 2023
9de1a79
Setting up React Query DevTools
arbor0711 Aug 18, 2023
d75417a
Override the default settings for the query Globally and locally.
arbor0711 Aug 18, 2023
f90f6a0
implement a custom hook for fetching data from API
arbor0711 Aug 19, 2023
1291734
Delete useData hook
arbor0711 Aug 21, 2023
310e40a
Parameterized queries- add query params and fetch specific data.
arbor0711 Aug 23, 2023
d795e02
Fix bugs: eliminate null in query array
arbor0711 Aug 23, 2023
4fdba9f
Paginated queries
arbor0711 Aug 23, 2023
0dded64
Bug fix: page is jumping when click pagination
arbor0711 Aug 23, 2023
545a880
Infinite Queries with ReactQuery
arbor0711 Aug 23, 2023
6705df1
Mutation data-Add new todo
arbor0711 Aug 23, 2023
8f06b19
Handling Mutation Errors
arbor0711 Aug 25, 2023
f2c9db9
Showing Mutation Progress-spinner/indicator
arbor0711 Aug 25, 2023
de81e62
Fix bug: value stays in the input field
arbor0711 Aug 25, 2023
1b8a316
Optimistic Updates for Addtodos
arbor0711 Aug 25, 2023
6764348
Creating a Custom Mutation Hook
arbor0711 Aug 25, 2023
7ef86f2
Creating a reusable APIClient
arbor0711 Aug 30, 2023
0bd966d
Creating a reusable HTTP service
arbor0711 Aug 30, 2023
7b99424
Update README.md
arbor0711 Sep 1, 2023
aabc8fe
Update README.md
arbor0711 Sep 1, 2023
4fc9556
Consolidating state logic with a reducer
arbor0711 Sep 4, 2023
c619b35
Merge branch 'main' of https://github.com/arbor0711/react-course-part…
arbor0711 Sep 4, 2023
9dfc85b
Update README.md
arbor0711 Sep 4, 2023
8017c82
Create complex action in reducer hook
arbor0711 Sep 4, 2023
522bea2
Merge branch 'main' of https://github.com/arbor0711/react-course-part…
arbor0711 Sep 4, 2023
84ed4fc
Exercise- Authentication reducer
arbor0711 Sep 4, 2023
bb62b98
relocate a reducer
arbor0711 Sep 5, 2023
80fd7c2
Use context to globally share tasks
arbor0711 Sep 5, 2023
ba3c918
Using context to manage auth state
arbor0711 Sep 5, 2023
c97a6b4
Create a custom provider
arbor0711 Sep 5, 2023
7fb2300
Create a hook to access context
arbor0711 Sep 5, 2023
e04727b
Creating a provider and a hook to manage context
arbor0711 Sep 5, 2023
9d30274
Organizing Code for Scalability and Maintainability
arbor0711 Sep 5, 2023
8a54fb7
Organizing Code
arbor0711 Sep 5, 2023
79f6df4
Use zustand to manaage counter state
arbor0711 Sep 6, 2023
63efe31
working with zustand
arbor0711 Sep 7, 2023
a791b16
Inspect stores in React dev tools
arbor0711 Sep 7, 2023
6c1157e
Setting up routing
arbor0711 Sep 7, 2023
5241687
Navigation- redirecting after submitting a form
arbor0711 Sep 8, 2023
d509e32
Passing data with route parameters- Dynamic routes
arbor0711 Sep 8, 2023
c43beed
Getting data from the current route- receive and update query string
arbor0711 Sep 8, 2023
11bee5f
Nested routes
arbor0711 Sep 8, 2023
361ad36
Nested Routes- users page
arbor0711 Sep 8, 2023
57579ab
Styling the Active link with NavLink component
arbor0711 Sep 8, 2023
54b5694
Error Handling with React Router
arbor0711 Sep 8, 2023
5be0b61
Private Routes
arbor0711 Sep 8, 2023
b7ca09d
Layout routes
arbor0711 Sep 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 8 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
# Playground Start

This is the starter code for the playground project we use in part 2 of my React course.

## Getting Started

To get started, follow these steps:

1. Clone this repository to your local machine.
2. Run `npm install` to install the required dependencies.
3. Run `npm run dev` to start the web server.

## About the Course

This repository belongs to part 2 of my React course covering intermediate-level topics.

- Fetching and updating data with React Query
- All about reducers, context, and providers
- Managing application state with Zustand
- Routing with React Router

You can find the course at https://codewithmosh.com
# React Advanced Topics
This repo is divided into three parts.
# First part- React Query
This repo is fully dedicated to react-query for fetching data from API from scratch to more complicated functions.
# Second part- Global State Management

## How to use
You need only follow the commits
220 changes: 211 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/react-query": "4.28",
"@tanstack/react-query-devtools": "4.28",
"axios": "^1.3.4",
"bootstrap": "^5.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"react-router-dom": "^6.10.0",
"simple-zustand-devtools": "^1.1.0",
"zustand": "^4.4.1"
},
"devDependencies": {
"@types/node": "^20.5.9",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^3.1.0",
Expand Down
14 changes: 12 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import './App.css';
import "./App.css";
import { TasksProvider } from "./state-management/tasks";
import HomePage from "./state-management/HomePage";
import NavBar from "./state-management/NavBar";
import Counter from "./state-management/counter/Counter";

function App() {
return <h1>React Starter Project</h1>;
return (
<TasksProvider>
<Counter />
<NavBar />
<HomePage />
</TasksProvider>
);
}

export default App;
Loading