Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit fe98f65

Browse files
committed
fixed typos
1 parent 5fb8f11 commit fe98f65

File tree

4 files changed

+84
-22
lines changed

4 files changed

+84
-22
lines changed

examples/react/develop/simple-counter/package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22
"name": "counter",
33
"version": "0.1.0",
44
"private": true,
5+
"scripts": {
6+
"start": "react-scripts start",
7+
"build": "react-scripts build",
8+
"test": "react-scripts test",
9+
"eject": "react-scripts eject",
10+
"analyze": "yarn run build && source-map-explorer 'build/static/js/*.js'",
11+
"analyze:webpack": "node scripts/analyze.js",
12+
"install:dev:agile": "yalc add @agile-ts/core @agile-ts/react @agile-ts/logger & yarn install",
13+
"install:prod:agile": "yarn add @agile-ts/core @agile-ts/react @agile-ts/logger & yarn install"
14+
},
515
"dependencies": {
616
"@agile-ts/core": "file:.yalc/@agile-ts/core",
717
"@agile-ts/logger": "file:.yalc/@agile-ts/logger",
818
"@agile-ts/react": "file:.yalc/@agile-ts/react",
19+
"@hookstate/core": "^3.0.8",
920
"@reduxjs/toolkit": "^1.6.1",
21+
"dotenv": "^10.0.0",
1022
"jotai": "^1.2.2",
1123
"nanostores": "^0.4.1",
1224
"react": "17.0.2",
@@ -19,16 +31,6 @@
1931
"source-map-explorer": "^2.5.2",
2032
"webpack-bundle-analyzer": "^4.4.2"
2133
},
22-
"scripts": {
23-
"start": "react-scripts start",
24-
"build": "react-scripts build",
25-
"test": "react-scripts test",
26-
"eject": "react-scripts eject",
27-
"analyze": "yarn run build && source-map-explorer 'build/static/js/*.js'",
28-
"analyze:webpack": "node scripts/analyze.js",
29-
"install:dev:agile": "yalc add @agile-ts/core @agile-ts/react @agile-ts/logger & yarn install",
30-
"install:prod:agile": "yarn add @agile-ts/core @agile-ts/react @agile-ts/logger & yarn install"
31-
},
3234
"browserslist": {
3335
"production": [
3436
">0.2%",

examples/react/develop/simple-counter/src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as Jotai from './state-manager/Jotai';
66
import * as NanoStores from './state-manager/NanoStores';
77
import * as Recoil from './state-manager/Recoil';
88
import * as ReduxToolkit from './state-manager/ReduxToolkit';
9+
import * as Hookstate from './state-manager/Hookstate';
910

1011
ReactDOM.render(
1112
<React.StrictMode>
@@ -14,6 +15,7 @@ ReactDOM.render(
1415
<NanoStores.App />
1516
<Recoil.App />
1617
<ReduxToolkit.App />
18+
<Hookstate.App />
1719
</React.StrictMode>,
1820
document.getElementById('root')
1921
);
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import React from 'react';
2+
import { createState, useState } from '@hookstate/core';
3+
4+
const COUNTER_A = createState(1);
5+
const COUNTER_B = createState(2);
6+
const COUNTER_C = createState(3);
7+
8+
const CounterA = () => {
9+
const count = useState(COUNTER_A);
10+
return (
11+
<div>
12+
A: {count.get()}{' '}
13+
<button onClick={() => count.set((c) => c + 1)}>+1</button>
14+
</div>
15+
);
16+
};
17+
18+
const CounterB = () => {
19+
const count = useState(COUNTER_B);
20+
return (
21+
<div>
22+
B: {count.get()}{' '}
23+
<button onClick={() => count.set((c) => c + 1)}>+1</button>
24+
</div>
25+
);
26+
};
27+
28+
const CounterC = () => {
29+
const count = useState(COUNTER_C);
30+
return (
31+
<div>
32+
C: {count.get()}{' '}
33+
<button onClick={() => count.set((c) => c + 1)}>+1</button>
34+
</div>
35+
);
36+
};
37+
38+
export const App = () => (
39+
<div>
40+
<p>Hookstate</p>
41+
<CounterA />
42+
<CounterA />
43+
<CounterB />
44+
<CounterB />
45+
<CounterC />
46+
<CounterC />
47+
</div>
48+
);

examples/react/develop/simple-counter/yarn.lock

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
"@agile-ts/core@file:.yalc/@agile-ts/core":
6-
version "0.2.0-alpha.4"
6+
version "0.2.0-alpha.3"
77
dependencies:
88
"@agile-ts/utils" "^0.0.7"
99

@@ -1783,6 +1783,11 @@
17831783
dependencies:
17841784
"@hapi/hoek" "^8.3.0"
17851785

1786+
"@hookstate/core@^3.0.8":
1787+
version "3.0.8"
1788+
resolved "https://registry.yarnpkg.com/@hookstate/core/-/core-3.0.8.tgz#d6838153d6d43c2f35cfca475c31248192564e62"
1789+
integrity sha512-blQagGIVIbNoUiNCRrvaXqFmUe7WGMY35ok/LENfl2pcIsLBjkreYIZiaSFi83tkycwq7ZOmcQz/R1nvLKhH8w==
1790+
17861791
"@istanbuljs/load-nyc-config@^1.0.0":
17871792
version "1.1.0"
17881793
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
@@ -2011,10 +2016,10 @@
20112016
schema-utils "^2.6.5"
20122017
source-map "^0.7.3"
20132018

2014-
"@polka/url@^1.0.0-next.17":
2015-
version "1.0.0-next.17"
2016-
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.17.tgz#25fdbdfd282c2f86ddf3fcefbd98be99cd2627e2"
2017-
integrity sha512-0p1rCgM3LLbAdwBnc7gqgnvjHg9KpbhcSphergHShlkWz8EdPawoMJ3/VbezI0mGC5eKCDzMaPgF9Yca6cKvrg==
2019+
"@polka/url@^1.0.0-next.20":
2020+
version "1.0.0-next.20"
2021+
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.20.tgz#111b5db0f501aa89b05076fa31f0ea0e0c292cd3"
2022+
integrity sha512-88p7+M0QGxKpmnkfXjS4V26AnoC/eiqZutE8GLdaI5X12NY75bXSdTY9NkmYb2Xyk1O+MmkuO6Frmsj84V6I8Q==
20182023

20192024
"@reduxjs/toolkit@^1.6.1":
20202025
version "1.6.1"
@@ -4789,6 +4794,11 @@ dotenv@8.2.0:
47894794
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
47904795
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
47914796

4797+
dotenv@^10.0.0:
4798+
version "10.0.0"
4799+
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
4800+
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
4801+
47924802
duplexer@^0.1.1, duplexer@^0.1.2:
47934803
version "0.1.2"
47944804
resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
@@ -10527,11 +10537,11 @@ simple-swizzle@^0.2.2:
1052710537
is-arrayish "^0.3.1"
1052810538

1052910539
sirv@^1.0.7:
10530-
version "1.0.14"
10531-
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.14.tgz#b826343f573e12653c5b3c3080a3a2a6a06595cd"
10532-
integrity sha512-czTFDFjK9lXj0u9mJ3OmJoXFztoilYS+NdRPcJoT182w44wSEkHSiO7A2517GLJ8wKM4GjCm2OXE66Dhngbzjg==
10540+
version "1.0.17"
10541+
resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.17.tgz#86e2c63c612da5a1dace1c16c46f524aaa26ac45"
10542+
integrity sha512-qx9go5yraB7ekT7bCMqUHJ5jEaOC/GXBxUWv+jeWnb7WzHUFdcQPGWk7YmAwFBaQBrogpuSqd/azbC2lZRqqmw==
1053310543
dependencies:
10534-
"@polka/url" "^1.0.0-next.17"
10544+
"@polka/url" "^1.0.0-next.20"
1053510545
mime "^2.3.1"
1053610546
totalist "^1.0.0"
1053710547

@@ -12117,9 +12127,9 @@ ws@^7.2.3:
1211712127
integrity sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==
1211812128

1211912129
ws@^7.3.1:
12120-
version "7.5.3"
12121-
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74"
12122-
integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==
12130+
version "7.5.4"
12131+
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9"
12132+
integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg==
1212312133

1212412134
xml-name-validator@^3.0.0:
1212512135
version "3.0.0"

0 commit comments

Comments
 (0)