[**@twipped/hooks**](../../README.md) • **Docs**

***

# Function: useToggledState()

> **useToggledState**(`initial`): [`ToggledState`](../type-aliases/ToggledState.md)

Produces a state hook that can only hold a boolean value.
Provides callbacks for toggling, activating and deactivating the state.

## Parameters

• **initial**: `boolean`= `false`

Initial state

## Returns

[`ToggledState`](../type-aliases/ToggledState.md)

## Function

useToggledState

## Source

[hooks/useToggledState.js:23](https://github.com/Twipped/hooks/blob/main/hooks/useToggledState.js#L23)
