From 93e69644b1c685406ed2ea739b9812463f81bc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 15 Aug 2024 10:36:29 +0200 Subject: [PATCH 1/4] alsos --- docs/convert.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/convert.md b/docs/convert.md index 11ec83a5d..5f47e83d1 100644 --- a/docs/convert.md +++ b/docs/convert.md @@ -209,7 +209,7 @@ Should be converted to: import.meta.resolve("npm:regl") ``` -Since notebooks also support [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import), you might also see libraries being loaded from CDNs such as [jsDelivr](https://www.jsdelivr.com/esm) or [esm.sh](https://esm.sh/). While you can use dynamic imports in Framework, for security and performance, we recommend also converting these into static imports. So this: +Since notebooks also support [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import), you might see libraries being loaded from CDNs such as [jsDelivr](https://www.jsdelivr.com/esm) or [esm.sh](https://esm.sh/). While you can use dynamic imports in Framework, for security and performance, we recommend converting these into static imports. So this: ```js run=false isoformat = import("https://esm.sh/isoformat") From c12099b7471be7a097890805ef1a57e1ae06f778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 15 Aug 2024 10:36:35 +0200 Subject: [PATCH 2/4] above --- docs/convert.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/convert.md b/docs/convert.md index 5f47e83d1..2854084ef 100644 --- a/docs/convert.md +++ b/docs/convert.md @@ -253,7 +253,7 @@ const foo = (function* () {
-Since variables are evaluated lazily, the generator `foo` will only run above if it is referenced by another code block. If you want to perform asynchronous side effects, consider using an animation loop and the [invalidation promise](./reactivity#invalidation) instead of a generator. +Since variables are evaluated lazily, the generator `foo` above will only run if it is referenced by another code block. If you want to perform asynchronous side effects, consider using an animation loop and the [invalidation promise](./reactivity#invalidation) instead of a generator.
From af975e74d9f9f1f79c25e6344358ec43749cae44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Thu, 15 Aug 2024 10:36:42 +0200 Subject: [PATCH 3/4] mutable --- docs/convert.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/convert.md b/docs/convert.md index 2854084ef..b1cc0f143 100644 --- a/docs/convert.md +++ b/docs/convert.md @@ -290,7 +290,7 @@ const foo = Mutable(42); const setFoo = (x) => (foo.value = x); ``` -Then replace any assignments to `mutable foo` with calls to `setFoo`. +Then replace any assignments to `mutable foo` with calls to `setFoo`. Note that `setFoo` must be declared in the same code block as `foo`, and that outside of that block, `foo` represents the value; any code that depends on foo will update reactively after setFoo is invoked. ## Standard library From 48b8eb5116a10a330dbe5b99b61909b3ef8c68cd Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Sun, 18 Aug 2024 15:54:49 -0400 Subject: [PATCH 4/4] more edits --- docs/convert.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/convert.md b/docs/convert.md index b1cc0f143..180d7d4c6 100644 --- a/docs/convert.md +++ b/docs/convert.md @@ -209,7 +209,7 @@ Should be converted to: import.meta.resolve("npm:regl") ``` -Since notebooks also support [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import), you might see libraries being loaded from CDNs such as [jsDelivr](https://www.jsdelivr.com/esm) or [esm.sh](https://esm.sh/). While you can use dynamic imports in Framework, for security and performance, we recommend converting these into static imports. So this: +Some notebooks use [dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) to load libraries from npm-backed CDNs such as [jsDelivr](https://www.jsdelivr.com/esm) and [esm.sh](https://esm.sh/). While you can use dynamic imports in Framework, for security and performance, we recommend converting these into static imports. So this: ```js run=false isoformat = import("https://esm.sh/isoformat") @@ -290,7 +290,7 @@ const foo = Mutable(42); const setFoo = (x) => (foo.value = x); ``` -Then replace any assignments to `mutable foo` with calls to `setFoo`. Note that `setFoo` must be declared in the same code block as `foo`, and that outside of that block, `foo` represents the value; any code that depends on foo will update reactively after setFoo is invoked. +Then replace any assignments to `mutable foo` with calls to `setFoo`. Note that `setFoo` must be declared in the same code block as `foo`, and that outside of that block, `foo` represents the value; any code that depends on `foo` will update reactively after `setFoo` is invoked. ## Standard library