create-mettle-app 1.9.5 → 1.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template-mettle/package.json +1 -1
- package/template-mettle/src/views/home.jsx +4 -6
- package/template-mettle-apps/package.json +1 -1
- package/template-mettle-apps/src/views/home.jsx +3 -4
- package/template-mettle-apps-ts/package.json +1 -1
- package/template-mettle-apps-ts/src/mettle-macros.d.ts +2 -0
- package/template-mettle-apps-ts/src/views/home.tsx +3 -4
- package/template-mettle-ts/package.json +1 -1
- package/template-mettle-ts/src/mettle-macros.d.ts +2 -0
- package/template-mettle-ts/src/views/home.tsx +4 -6
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { signal } from 'mettle';
|
|
2
|
-
|
|
3
1
|
export default function Home() {
|
|
4
|
-
|
|
2
|
+
let count = $signal(0);
|
|
5
3
|
|
|
6
4
|
function add() {
|
|
7
|
-
count
|
|
5
|
+
count++;
|
|
8
6
|
}
|
|
9
7
|
return (
|
|
10
8
|
<>
|
|
11
9
|
<button onClick={add}>Add</button>
|
|
12
|
-
<h1>{count
|
|
13
|
-
<input value={count
|
|
10
|
+
<h1>{count}</h1>
|
|
11
|
+
<input value={count} />
|
|
14
12
|
</>
|
|
15
13
|
);
|
|
16
14
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { signal } from 'mettle';
|
|
2
1
|
import { linkTo } from 'mettle-router';
|
|
3
2
|
|
|
4
3
|
export default function Home() {
|
|
5
|
-
|
|
4
|
+
let msg = $signal('hello');
|
|
6
5
|
|
|
7
6
|
function goAbout() {
|
|
8
7
|
linkTo({
|
|
@@ -15,14 +14,14 @@ export default function Home() {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
function useChange() {
|
|
18
|
-
msg
|
|
17
|
+
msg = 'world';
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
return (
|
|
22
21
|
<>
|
|
23
22
|
<button onClick={goAbout}>goAbout</button>
|
|
24
23
|
<h1>Home</h1>
|
|
25
|
-
<p onClick={useChange}>{msg
|
|
24
|
+
<p onClick={useChange}>{msg}</p>
|
|
26
25
|
</>
|
|
27
26
|
);
|
|
28
27
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { signal } from 'mettle';
|
|
2
1
|
import { linkTo } from 'mettle-router';
|
|
3
2
|
|
|
4
3
|
export default function Home() {
|
|
5
|
-
|
|
4
|
+
let msg = $signal('hello');
|
|
6
5
|
|
|
7
6
|
function goAbout() {
|
|
8
7
|
linkTo({
|
|
@@ -15,14 +14,14 @@ export default function Home() {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
function useChange() {
|
|
18
|
-
msg
|
|
17
|
+
msg = 'world';
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
return (
|
|
22
21
|
<>
|
|
23
22
|
<button onClick={goAbout}>goAbout</button>
|
|
24
23
|
<h1>Home</h1>
|
|
25
|
-
<p onClick={useChange}>{msg
|
|
24
|
+
<p onClick={useChange}>{msg}</p>
|
|
26
25
|
</>
|
|
27
26
|
);
|
|
28
27
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { signal } from 'mettle';
|
|
2
|
-
|
|
3
1
|
export default function Home() {
|
|
4
|
-
|
|
2
|
+
let count: any = $signal(0);
|
|
5
3
|
|
|
6
4
|
function add() {
|
|
7
|
-
count
|
|
5
|
+
count++;
|
|
8
6
|
}
|
|
9
7
|
return (
|
|
10
8
|
<>
|
|
11
9
|
<button onClick={add}>Add</button>
|
|
12
|
-
<h1>{count
|
|
13
|
-
<input value={count
|
|
10
|
+
<h1>{count}</h1>
|
|
11
|
+
<input value={count} />
|
|
14
12
|
</>
|
|
15
13
|
);
|
|
16
14
|
}
|