Skip to content

Instantly share code, notes, and snippets.

@lukaszkrzywizna
Created March 10, 2023 07:59
Show Gist options
  • Save lukaszkrzywizna/67b33369f59e1c107a925ae031d81b46 to your computer and use it in GitHub Desktop.
Save lukaszkrzywizna/67b33369f59e1c107a925ae031d81b46 to your computer and use it in GitHub Desktop.
ReactMemoAttribute_are-equals
// Attribute can only use local functions so for the outsides ones, the binding is needed
let eq x y = Fable.React.Helpers.equalsButFunctions x y
[<ReactMemoComponent(memoAreEqual=nameof eq)>]
let MyFunc (txt: string) (number: int) = Html.div [ Html.h1 number; Html.p txt ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment