Open
Description
Given I have the following code
let test<'T> =
FunctionComponent.Of((fun (props: {|Dispatch: Msg -> unit; test: 'T|}) ->
log props.test
span [] []
]), memoizeWith= fun o n -> log "haha"; false)
// Use somewhere in the code say at the root component
test({|Dispatch=dispatch; test: 5|})
The memoizeWith callback is not called, and for some reason the function keeps getting called infinitely.
If I change it to a non generic then it works fine
let test =
FunctionComponent.Of((fun (props: {|Dispatch: Msg -> unit; test: int|}) ->
log props.test
span [] []
]), memoizeWith= fun o n -> log "haha"; false)
// Use somewhere in the code say at the root component
test({|Dispatch=dispatch; test: 5|})
Not sure if this is an issue with Fable or React.
Metadata
Metadata
Assignees
Labels
No labels