• Toggle wrap component which accepts initial state and enable/disable on mount prop. Returns a render function to consume the toggle hook.


    Parameters

    Returns Element

    Render function to consume the toggle hook

    Example

    <ToggleWrap>
    {({ state, disable, enable, set, toggle }) => (
    <div>...</div>
    )}
    </ToggleWrap>