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

Commit 63e3fec

Browse files
committed
1.0.6
1 parent b5b5709 commit 63e3fec

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

langs/en/api.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ const [getValue, setValue] = createSignal(initialValue, { equals: false });
5151
By default, when a signal's setter is called, dependencies are only rerun if the new value is actually different than the old value. You can set `equals` to `false` to always rerun dependencies after the setter is called, or you can pass your own equality function.
5252

5353
```js
54-
const [myString, setMyString] = createSignal("string", { equals: (newVal, oldVal) => newVal.length === oldVal.length });
54+
const [myString, setMyString] = createSignal("string", {
55+
equals: (newVal, oldVal) => newVal.length === oldVal.length
56+
});
5557

56-
setMyString("strung") //is considered equal by the function and won't cause updates
58+
setMyString("strung") //is considered equal to the last value and won't cause updates
5759
setMyString("stranger") //is considered different and will cause updates
5860
```
5961

@@ -67,7 +69,7 @@ export function createEffect<T>(
6769
): void;
6870
```
6971

70-
Creates a new computation that automatically tracks dependencies and runs after each render where a dependency has changed. Ideal for using `ref`s and managing other side effects.
72+
Creates a new computation that automatically tracks dependencies and runs after each render in which a dependency has changed. Ideal for using `ref`s and managing other side effects.
7173

7274
```js
7375
const [a, setA] = createSignal(initialValue);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solid.js/docs",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"files": [
55
"dist"
66
],

0 commit comments

Comments
 (0)