I don't remember if we had this discussion before but it would be very useful to have the option to use React.memo with ReactComponent attribute. This seems to work, I had to use another type because new(memo: bool) constructor conflicted with new(exportDefault: bool). To my surprise F# optional arguments are not compatible with attribute constructors, the other option would be to use .NET optional arguments, as in [<Optional; DefaultParameterValue(false)>] memo
If this looks good, it'd be great to have a release so I can use it in my project :)
I don't remember if we had this discussion before but it would be very useful to have the option to use
React.memo
withReactComponent
attribute. This seems to work, I had to use another type becausenew(memo: bool)
constructor conflicted withnew(exportDefault: bool)
. To my surprise F# optional arguments are not compatible with attribute constructors, the other option would be to use .NET optional arguments, as in[<Optional; DefaultParameterValue(false)>] memo
If this looks good, it'd be great to have a release so I can use it in my project :)