1.0.2 • Published 1 year ago

wizecore-hooks v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

wizecore-hooks / Exports

wizecore-hooks

Table of contents

Type Aliases

Functions

Type Aliases

Destructor

Ƭ Destructor: () => void

Type declaration

▸ (): void

Returns

void

Defined in

useClientOnce.ts:3

Functions

useClientOnce

useClientOnce(callback): void

Guaranteed to run once at the client side.

Parameters

NameType
callback() => void | Destructor

Returns

void

Defined in

useClientOnce.ts:8


useDocumentTitle

useDocumentTitle(title): void

Sets the document title.

Parameters

NameType
titlestring

Returns

void

Defined in

useDocumentTitle.ts:6


useElementPosition

useElementPosition(ref): Object

Get the position of an element.

Parameters

NameType
refRefObject<HTMLElement>

Returns

Object

NameType
heightnumber
leftnumber
topnumber
widthnumber

Defined in

useElementPosition.ts:7


useFullscreen

useFullscreen(ref, options?): () => void

Request full screen for a specified iframe element

Parameters

NameType
refRefObject<HTMLIFrameElement | HTMLDivElement>
optionsObject
options.onEnter() => void
options.onError(err: Error) => void
options.onExit() => void

Returns

fn

▸ (): void

Returns

void

Defined in

useFullscreen.ts:21


useIsomorphicLayoutEffect

useIsomorphicLayoutEffect(effect, deps?): void

Use the layout effect on the client and the effect on the server.

Parameters

NameType
effectEffectCallback
deps?DependencyList

Returns

void

Defined in

node_modules/@types/react/index.d.ts:1070


useUserAgent

useUserAgent(): Object

Parse the user agent string to determine if the user is using Safari on an iPhone or iPad.

Returns

Object

NameType
Safariundefined | boolean
iPadundefined | boolean
iPhoneundefined | boolean
userAgentundefined | string

Defined in

useUserAgent.ts:6

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago