You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+71-58Lines changed: 71 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ It will stop executing `Function` if:
101
101
102
102
## useGatherMemo
103
103
104
-
`useGatherMemo` abstracts merging, gathering, and/or picking properties from object(s), while memoizing the result, ie. by preserving reference(s).
104
+
`useGatherMemo` abstracts gathering (merging) and/or picking (destructuring) properties from object(s) while memoizing the result to avoid unneeded updates in the component and its children.
105
105
106
106
It's a low level hook that can be usefull eg. when you want to merge options or props received in a hook or a component with a large default options object, instead of listing each option argument with a default value and/or listing each one as a dependency of a hook.
107
107
@@ -110,20 +110,31 @@ It's a low level hook that can be usefull eg. when you want to merge options or
110
110
**Example:**
111
111
112
112
```js
113
-
constoptions= { color:'red', size:'large' }
114
-
115
-
// 1. Pick prop(s) and gather the rest
116
-
// Both constants will be defined with a memoized value/reference,
117
-
// if `options` shallow equals its previous render value
**Warning:** don't over use it, ie. use it only with large objects, otherwise it will negatively impact performances by increasing the call stack as well as the amount of data stored in memory.
@@ -246,59 +257,61 @@ It returns any error message from the Constraint Validation API, and a collectio
246
257
247
258
`<Filter>` provides common filter effects to use in a `SVGElement`.
When used alone, `<Filter>` should not have a `in` or `result` and it will automatically be wrapped in a `<filter>` with the following default prop values:
262
272
263
-
- color: `'black'`
264
-
- lightness: `1`
265
-
- opacity: `0.5`
266
-
- offsetX: `0`
267
-
- offsetY: `0`
268
-
- saturation: `1`
273
+
-`'colorInterpolation'` (for the `color-interpolation-filter` attribute): `'sRGB'`
274
+
-`'id'`: `'name'`
275
+
-`'width'` and `'height'`: based on `'name'`
276
+
-`'x'` and `'y'`: based on `'width'` and `'height'`
269
277
270
-
All props require a number, except `blend` (CSS blend mode) and `color` (CSS color).
278
+
`'width'`, `'height'`, `'x'`, `'y'` should be provided as percentage values.
0 commit comments