Skip to content

Commit b4414e1

Browse files
committed
Initial example project setup
1 parent e73bb9a commit b4414e1

24 files changed

+5969
-0
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.vscode
8+
9+
# testing
10+
/coverage
11+
12+
# production
13+
/build
14+
/dist
15+
16+
# misc
17+
.DS_Store
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
typesversions
28+
.cache
29+
.yarnrc
30+
.yarn/*
31+
!.yarn/patches
32+
!.yarn/releases
33+
!.yarn/plugins
34+
!.yarn/sdks
35+
!.yarn/versions
36+
.pnp.*
37+
*.tgz

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"arrowParens": "always",
5+
"printWidth": 120
6+
}

.yarn/releases/yarn-4.2.2.cjs

Lines changed: 894 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
yarnPath: .yarn/releases/yarn-4.2.2.cjs
2+
3+
enableGlobalCache: false
4+
5+
nodeLinker: node-modules

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Redux Essentials Tutorial Example
2+
3+
This project contains the setup and code from the "Redux Essentials" tutorial example app in the Redux docs ( https://redux.js.org/tutorials/essentials/part-3-data-flow ).
4+
5+
The `master` branch has a single commit that already has the initial project configuration in place. You can use this as the starting point to follow along with the instructions from the tutorial.
6+
7+
The `tutorial-steps-ts` branch has the actual code commits from the tutorial. You can look at these to see how the official tutorial actually implements each piece of functionality along the way.
8+
9+
This project was bootstrapped with [Vite](https://vitejs.dev/), and is based on the [official Redux Toolkit + Vite template](https://github.com/reduxjs/redux-templates/tree/master/packages/vite-template-redux).
10+
11+
## Package Managers
12+
13+
This project is currently set up to use [Yarn 4](https://yarnpkg.com/getting-started/usage) as the package manager.
14+
15+
If you prefer to use another package manager, such as NPM, PNPM, or Bun, delete the `"packageManager"` section from `package.json` and the `.yarnrc.yml` and `yarn.lock` files, then install dependencies with your preferred package manager.
16+
17+
## Available Scripts
18+
19+
In the project directory, you can run:
20+
21+
### `yarn dev`
22+
23+
Runs the app in the development mode.<br />
24+
Open [http://localhost:4173](http://localhost:4173) to view it in the browser.
25+
26+
The page will reload if you make edits.<br />
27+
28+
### `yarn build`
29+
30+
Builds the app for production to the `dist` folder.<br />
31+
It correctly bundles React in production mode and optimizes the build for the best performance.
32+
33+
## Learn More
34+
35+
You can learn more about building and deploying in the [Vite docs](https://vitejs.dev/).
36+
37+
To learn React, check out the [React documentation](https://react.dev).

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<link rel="apple-touch-icon" href="logo192.png" />
8+
<title>Redux Essentials Example App</title>
9+
</head>
10+
<body>
11+
<noscript>You need to enable JavaScript to run this app.</noscript>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
</html>

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "redux-essentials-example",
3+
"version": "2.0.0",
4+
"private": true,
5+
"dependencies": {
6+
"@faker-js/faker": "^8",
7+
"@mswjs/data": "^0.16",
8+
"@reduxjs/toolkit": "^2.2",
9+
"classnames": "^2.2.6",
10+
"date-fns": "^3",
11+
"mock-socket": "^9.0.3",
12+
"msw": "^2",
13+
"react": "^18",
14+
"react-dom": "^18",
15+
"react-redux": "^9",
16+
"react-router-dom": "^6",
17+
"react-tiny-toast": "^2.0.1"
18+
},
19+
"scripts": {
20+
"dev": "vite",
21+
"start": "vite",
22+
"build": "tsc && vite build",
23+
"format": "prettier --write ./src/**/*.{ts,tsx,css}"
24+
},
25+
"devDependencies": {
26+
"@types/node": "^20.11.6",
27+
"@types/react": "^18.2.47",
28+
"@types/react-dom": "^18.2.18",
29+
"@vitejs/plugin-react": "^4.2.1",
30+
"prettier": "^3.2.1",
31+
"typescript": "^5.4",
32+
"vite": "^5.0.11"
33+
},
34+
"msw": {
35+
"workerDirectory": "public"
36+
},
37+
"packageManager": "[email protected]"
38+
}

public/favicon.ico

3.5 KB
Binary file not shown.

public/logo192.png

4.06 KB
Loading

public/logo512.png

11.8 KB
Loading

0 commit comments

Comments
 (0)