Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.14 KB

README.md

File metadata and controls

39 lines (32 loc) · 1.14 KB

Feliz.ReactNative Nuget Publish on NuGet

React Native bindings for Feliz

Usage:

module App

open Feliz
open Feliz.ReactNative

[<ReactComponent>]
let Counter() =
    let (count, setCount) = React.useState(0)
    Comp.view [
        Comp.text [
            prop.style [
                style.width 50.
                style.height 50.
                style.backgroundColor "red"
            ]
            prop.onPress (fun _ -> setCount(count + 1))
            prop.text "Increment"
        ]

        Comp.text [
            prop.style [
                style.width 50.
                style.height 50.
                style.backgroundColor "blue"
            ]
            prop.onPress (fun _ -> setCount(count - 1))
            prop.text "Decrement"
        ]

        Comp.text (count |> string)
    ]