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: docs/docs/api-docs/feliz/react-component.mdx
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,24 @@ import RawMemoAttribute from '!!raw-loader!../../feliz-docs/Examples/React/MemoA
199
199
<MemoAttribute />
200
200
</ComponentRender>
201
201
202
-
### areEqual with js emit
202
+
### areEqual - Feliz predefined functions
203
+
204
+
Feliz features prewritten equality functions for common scenarios that can be used with the `areEqualFn` parameter of the `[<ReactMemoComponent>]` attribute. This parameter
205
+
accepts an integer value that corresponds to the desired equality function:
206
+
207
+
-`0`/`AreEqualFn.FsEquals` - Uses F#'s built-in equality comparison (`=`) for all props. So everything that normally returns true when using F# equality `=` will return true here as well.
208
+
-`1`/`AreEqualFn.FsEqualsButFunctions` - Uses F#'s built-in equality comparison (`=`) for all props, but ignores all functions in props. This is useful when you have functions as props that are recreated on each render, but you want to ignore them for equality checks.
209
+
210
+
You can also use defined integer constants for example: `AreEqualFn.FsEquals` for better readability.
You can pass a custom equality function to the `[<ReactMemoComponent>]` attribute using the `areEqual` parameter. The value must be a JavaScript function expressed as a string. This function will be used to determine whether the component should re-render based on its props.
205
222
@@ -242,7 +259,7 @@ import RawMemoAttributeAreEqualEmit from '!!raw-loader!../../feliz-docs/Examples
242
259
<MemoAttributeAreEqualEmit />
243
260
</ComponentRender>
244
261
245
-
### areEqual with F# function
262
+
### areEqual - F# function call emit
246
263
247
264
We can also emit a call to a f# function defined in the same file. This function must have the correct signature to be used as an equality function.
Glutinum is a simple and easy-to-use tool, allowing you to convert <code>.d.ts</code> files to F# bindings directly from your browser without installing anything.
14
+
15
+
Check out the handy online converter at <ahref="https://glutinum.net/"target='_blank'>https://glutinum.net/</a> to get started quickly!
Copy file name to clipboardExpand all lines: docs/docs/ecosystem/02_UI/tailwindcss.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,10 @@ Because interop with tailwind and F# is so quick and easy the [Feliz template](.
18
18
19
19
You can easily configure the [tailwindcss VS Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) to provide autocomplete and intellisense features for F# files. Check out the autocomplete and intellisense features from the image below!
20
20
21
+
:::note[YOUR HELP NEEDED ❤️]
22
+
If anyone is using a different editor and knows how to set this up there, please(!) let me know!
23
+
:::
24
+
21
25

22
26
23
27
You just need to add the following to your VS Code settings.json:
0 commit comments