This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AdaptiveSample | |
open Fable.React | |
open Fable.React.Props | |
open FSharp.Data.Adaptive | |
let useAdaptive (v: aval<'T>) = | |
// initialize hook with initial value | |
let stateHook = Hooks.useState (AVal.force v) | |
let onChange () = |