UNPKG

swiftui-react-native

Version:

A React Native component library inspired by SwiftUI

10 lines (9 loc) 471 B
import { Binding, BooleanBinding } from '../utils/binding'; /** * Creates a Binding object that can be used to read and write to a value. * Components can recieve a binding as a prop and can handle the logic of * getting and setting the value from inside the component. * @param initialValue * @returns A Binding containing the value and a setter function. */ export declare function useBinding<T>(initialValue: T): T extends boolean ? BooleanBinding : Binding<T>;