How to write Fable bindings for a React component library

Are there step-by-step instructions for writing bindings for a library of responsive components from F # / Fable?

The only example I could find is fable-react-toolbox , which makes extensive use of the deprecated attribute KeyValueList.

I am particularly interested in using the BlueprintJS library ; I was able to use ts2fableto create an interface that matches the different ones props, but I don’t know what to do next or where to turn for help!

Any guidance would be greatly appreciated!

Michael

+6
source share
1 answer

, Fable React .

, Foo ( IFooProps) - , , .

let Foo : ComponentClass<obj> = import "Foo" "react-bar"
let inline foo (props : IFooProps list) elems =
    Fable.Helpers.React.from Foo (keyValueList CaseRules.LowerFirst props) elems

ComponentClass Fable.Import.React.

GitHub https://github.com/fable-compiler/Fable/issues/1044.

+2

All Articles