Toggle wrap component which accepts initial state and enable/disable on mount prop. Returns a render function to consume the toggle hook.
Toggle wrap props
Render function to consume the toggle hook
<ToggleWrap> {({ state, disable, enable, set, toggle }) => ( <div>...</div> )} </ToggleWrap> Copy
<ToggleWrap> {({ state, disable, enable, set, toggle }) => ( <div>...</div> )} </ToggleWrap>
Toggle wrap component which accepts initial state and enable/disable on mount prop. Returns a render function to consume the toggle hook.