UNPKG

@appbuckets/react-ui-core

Version:

Core utilities built for AppBuckets React UI Framework

18 lines (17 loc) 486 B
import * as React from 'react'; declare type UseAutoControlledValueConfig<State> = { /** Control the Props at any Render, use this to get external controls */ prop?: State; /** Initial Value */ defaultProp?: State; }; export default function useAutoControlledValue<State>( initialState: State, config?: UseAutoControlledValueConfig<State> ): [ State, React.Dispatch<React.SetStateAction<State>>, React.Dispatch<React.SetStateAction<State>>, () => void ]; export {};