wizecore-hooks / Exports
- useClientOnce
- useDocumentTitle
- useElementPosition
- useFullscreen
- useIsomorphicLayoutEffect
- useUserAgent
Ƭ Destructor: () => void
▸ (): void
void
▸ useClientOnce(callback
): void
Guaranteed to run once at the client side.
Name | Type |
---|---|
callback |
() => void | Destructor |
void
▸ useDocumentTitle(title
): void
Sets the document title.
Name | Type |
---|---|
title |
string |
void
▸ useElementPosition(ref
): Object
Get the position of an element.
Name | Type |
---|---|
ref |
RefObject <HTMLElement > |
Object
Name | Type |
---|---|
height |
number |
left |
number |
top |
number |
width |
number |
▸ useFullscreen(ref
, options?
): () => void
Request full screen for a specified iframe element
Name | Type |
---|---|
ref |
RefObject <HTMLIFrameElement | HTMLDivElement > |
options |
Object |
options.onEnter |
() => void |
options.onError |
(err : Error ) => void |
options.onExit |
() => void |
fn
▸ (): void
void
▸ useIsomorphicLayoutEffect(effect
, deps?
): void
Use the layout effect on the client and the effect on the server.
Name | Type |
---|---|
effect |
EffectCallback |
deps? |
DependencyList |
void
node_modules/@types/react/index.d.ts:1070
▸ useUserAgent(): Object
Parse the user agent string to determine if the user is using Safari on an iPhone or iPad.
Object
Name | Type |
---|---|
Safari |
undefined | boolean |
iPad |
undefined | boolean |
iPhone |
undefined | boolean |
userAgent |
undefined | string |