From 8804608108cc1205e46dfca42a8cff3668a7ea78 Mon Sep 17 00:00:00 2001 From: kaisergeX Date: Sat, 7 Sep 2024 14:40:35 +0700 Subject: [PATCH] docs: README update --- .changeset/kind-crews-allow.md | 5 +++++ packages/signal/README.md | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/kind-crews-allow.md diff --git a/.changeset/kind-crews-allow.md b/.changeset/kind-crews-allow.md new file mode 100644 index 0000000..5ac3831 --- /dev/null +++ b/.changeset/kind-crews-allow.md @@ -0,0 +1,5 @@ +--- +'@kaiverse/signal': patch +--- + +update README diff --git a/packages/signal/README.md b/packages/signal/README.md index 2ea7032..87529b0 100644 --- a/packages/signal/README.md +++ b/packages/signal/README.md @@ -52,7 +52,7 @@ Signal is a [**Proxy**](https://developer.mozilla.org/docs/Web/JavaScript/Refere ## Example -[Playground source code](src/playground/index.ts) +[Playground source code](https://github.com/kaisergeX/signal-proxy/blob/main/packages/signal/src/playground/index.ts) ### Use Signal Proxy @@ -102,6 +102,7 @@ setInterval(() => { }, 1000); createEffect(() => { + // log the count signal's value to the console every 1 second console.log('count =', count()); }); @@ -116,4 +117,8 @@ createEffect(() => { ### React -[Experimental] [React signal hooks](../../apps/playground/src/hooks/react-signal.ts) implementation ([React playground source code](../../apps/playground/src/routes/signal/route.lazy.tsx)). **DO NOT** use in production.
Those hooks work, but its lack of testing and seems that the usage of memory is inefficient. An alternative approach may be better. Please feel free to open PRs. Your contributions are welcomed and appreciated. +[Experimental] [React signal hooks](https://github.com/kaisergeX/signal-proxy/blob/main/apps/playground/src/hooks/react-signal.ts) implementation. **DO NOT** use in production. + +Those hooks work, but its lack of testing and seems that the usage of memory is inefficient. An alternative approach may be better. Please feel free to open PRs. Your contributions are welcomed and appreciated. + +[React playground source code](https://github.com/kaisergeX/signal-proxy/blob/main/apps/playground/src/routes/signal/route.lazy.tsx)