wizecore-hooks
v1.0.2
Published
[wizecore-hooks](README.md) / Exports
Downloads
20
Readme
wizecore-hooks / Exports
wizecore-hooks
Table of contents
Type Aliases
Functions
Type Aliases
Destructor
Ƭ Destructor: () => void
Type declaration
▸ (): void
Returns
void
Defined in
Functions
useClientOnce
▸ useClientOnce(callback
): void
Guaranteed to run once at the client side.
Parameters
| Name | Type |
| :------ | :------ |
| callback
| () => void
| Destructor
|
Returns
void
Defined in
useDocumentTitle
▸ useDocumentTitle(title
): void
Sets the document title.
Parameters
| Name | Type |
| :------ | :------ |
| title
| string
|
Returns
void
Defined in
useElementPosition
▸ useElementPosition(ref
): Object
Get the position of an element.
Parameters
| Name | Type |
| :------ | :------ |
| ref
| RefObject
<HTMLElement
> |
Returns
Object
| Name | Type |
| :------ | :------ |
| height
| number
|
| left
| number
|
| top
| number
|
| width
| number
|
Defined in
useFullscreen
▸ useFullscreen(ref
, options?
): () => void
Request full screen for a specified iframe element
Parameters
| Name | Type |
| :------ | :------ |
| ref
| RefObject
<HTMLIFrameElement
| HTMLDivElement
> |
| options
| Object
|
| options.onEnter
| () => void
|
| options.onError
| (err
: Error
) => void
|
| options.onExit
| () => void
|
Returns
fn
▸ (): void
Returns
void
Defined in
useIsomorphicLayoutEffect
▸ useIsomorphicLayoutEffect(effect
, deps?
): void
Use the layout effect on the client and the effect on the server.
Parameters
| Name | Type |
| :------ | :------ |
| effect
| EffectCallback
|
| 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
| Name | Type |
| :------ | :------ |
| Safari
| undefined
| boolean
|
| iPad
| undefined
| boolean
|
| iPhone
| undefined
| boolean
|
| userAgent
| undefined
| string
|