Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 433 Bytes

State.md

File metadata and controls

22 lines (16 loc) · 433 Bytes

State

import { State } from 'renex';

<State initial={false}>
  {(state, setState) => { /* ... */ }}
</State>


// If you need more control on the data type
<State<'light' | 'dark' | 'dim'> >
  {/* ... */}
</State>

Props

Name Type Default Description
as string Fragment HTML tag to render.
initial any Initial value to pass into useState hook.