Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/carne8/Feliz.ReactNative

React Native bindings for Feliz
https://github.com/carne8/Feliz.ReactNative

fable fable-bindings fable-compiler fable-elmish fable-react fable-react-native fablejs feliz fsharp react-native

Last synced: about 1 month ago
JSON representation

React Native bindings for Feliz

Awesome Lists containing this project

README

        

# Feliz.ReactNative [![Nuget](https://img.shields.io/nuget/v/Feliz.ReactNative.svg?maxAge=0&colorB=brightgreen)](https://www.nuget.org/packages/Feliz.ReactNative) [![Publish on NuGet](https://github.com/carne8/Feliz.ReactNative/actions/workflows/publish.yml/badge.svg)](https://github.com/carne8/Feliz.ReactNative/actions/workflows/publish.yml)

React Native bindings for [Feliz](https://github.com/Zaid-Ajaj/Feliz)

Usage:

```fsharp
module App

open Feliz
open Feliz.ReactNative

[]
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)
]
```