Skip to content

Commit 4f03aca

Browse files
author
Huy TA QUOC
committed
Initial commit
0 parents  commit 4f03aca

40 files changed

+3945
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Flexible Counter App
2+
3+
This project demonstrates switching between implementations of a store (Vuex, Redux, Valtio, MobX) and UI libraries/frameworks (Vue, React and Svelte).
4+
5+
## Instructions
6+
7+
### Run the app
8+
9+
```bash
10+
npm run dev
11+
```
12+
13+
### Switching back and forth
14+
15+
- To replace an implementation of the store with another, go to **src/modules/counter/infrastructure/store/counter.store.ts** and comment/uncomment the equivalent sections of the code.
16+
17+
- To replace Vue with Svelte (or vice versa):
18+
19+
- Go to **src/main.ts** and comment/uncomment the equivalent sections of the code.
20+
- Go to **vite.config.ts** and comment/uncomment the equivalent parts of the code.
21+
22+
- To switch to React, you'll have to rename:
23+
- **index-tsx.html** to **index.html**
24+
- **tsconfig-tsx.json** to **tsconfig.json**
25+
- **vite-tsx.config.ts** to **vite.config.ts**

index-tsx.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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.0" />
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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.0" />
7+
<title>Vite App</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)