@ripple-ts/compat-react 0.3.3 → 0.3.4
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/CHANGELOG.md +13 -0
- package/package.json +2 -2
- package/tests/index.test.ripple +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ripple-ts/compat-react
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
[[`92982cd`](https://github.com/Ripple-TS/ripple/commit/92982cd7b918d0afee9334c74765573b30c8a645),
|
|
9
|
+
[`747ae1f`](https://github.com/Ripple-TS/ripple/commit/747ae1fc7948e994eeb521f3ed78711c9dd3e802),
|
|
10
|
+
[`abe1caa`](https://github.com/Ripple-TS/ripple/commit/abe1caa6ab636722099a6ecd4cafbf117d208ec2),
|
|
11
|
+
[`046d0ba`](https://github.com/Ripple-TS/ripple/commit/046d0baf190d161c3b851799080d11eb4f95e094),
|
|
12
|
+
[`79a920e`](https://github.com/Ripple-TS/ripple/commit/79a920e30f0f35f2ec07ff8d52dc709f8bb74c77),
|
|
13
|
+
[`83807a4`](https://github.com/Ripple-TS/ripple/commit/83807a412603ff49c398f9365b011fd4b4a5f8bf)]:
|
|
14
|
+
- ripple@0.3.4
|
|
15
|
+
|
|
3
16
|
## 0.3.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ripple-ts/compat-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Ripple compatibility layer for React",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Dominic Gannaway",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"react": "^19.2.0",
|
|
19
19
|
"react-dom": "^19.2.0",
|
|
20
|
-
"ripple": "0.3.
|
|
20
|
+
"ripple": "0.3.4"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^24.3.0",
|
package/tests/index.test.ripple
CHANGED
|
@@ -230,7 +230,7 @@ describe('compat-react', () => {
|
|
|
230
230
|
|
|
231
231
|
it('should work with Ripple reactivity', async () => {
|
|
232
232
|
component App() {
|
|
233
|
-
let count =
|
|
233
|
+
let count = track(0);
|
|
234
234
|
<div>
|
|
235
235
|
<div class="ripple-count">{@count}</div>
|
|
236
236
|
<button onClick={() => @count++}>{'Increment'}</button>
|
|
@@ -464,7 +464,7 @@ describe('compat-react', () => {
|
|
|
464
464
|
component AsyncRippleChild() {
|
|
465
465
|
await sleep(1000);
|
|
466
466
|
|
|
467
|
-
let count =
|
|
467
|
+
let count = track(0);
|
|
468
468
|
|
|
469
469
|
<div>
|
|
470
470
|
<div class="async-content">{'Loaded!'}</div>
|
|
@@ -530,7 +530,7 @@ describe('compat-react', () => {
|
|
|
530
530
|
|
|
531
531
|
let setPage: (page: number) => void;
|
|
532
532
|
|
|
533
|
-
component AsyncRippleChild({ page }: { page: number }) {
|
|
533
|
+
component AsyncRippleChild(&{ page }: { page: number }) {
|
|
534
534
|
// Using await track(() => ...) to create a reactive async operation
|
|
535
535
|
// that re-suspends when the tracked dependency (page) changes
|
|
536
536
|
await track(() => {
|
|
@@ -549,7 +549,7 @@ describe('compat-react', () => {
|
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
component App() {
|
|
552
|
-
let page =
|
|
552
|
+
let page = track(1);
|
|
553
553
|
setPage = (p: number) => {
|
|
554
554
|
@page = p;
|
|
555
555
|
};
|
|
@@ -612,7 +612,7 @@ describe('compat-react', () => {
|
|
|
612
612
|
|
|
613
613
|
let setPage: (page: number) => void;
|
|
614
614
|
|
|
615
|
-
component AsyncRippleChild({ page }: { page: number }) {
|
|
615
|
+
component AsyncRippleChild(&{ page }: { page: number }) {
|
|
616
616
|
// Simple static await - no tracked dependencies
|
|
617
617
|
await sleep(1000);
|
|
618
618
|
|
|
@@ -629,7 +629,7 @@ describe('compat-react', () => {
|
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
component App() {
|
|
632
|
-
let page =
|
|
632
|
+
let page = track(1);
|
|
633
633
|
setPage = (p: number) => {
|
|
634
634
|
@page = p;
|
|
635
635
|
};
|