wizecore-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Name Type
callback () => void | Destructor

Returns

void

Defined in

useClientOnce.ts:8


useDocumentTitle

useDocumentTitle(title): void

Sets the document title.

Parameters

Name Type
title string

Returns

void

Defined in

useDocumentTitle.ts:6


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

useElementPosition.ts:7


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

useFullscreen.ts:21


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

Defined in

useUserAgent.ts:6

Readme

Keywords

none

Package Sidebar

Install

npm i wizecore-hooks

Weekly Downloads

70

Version

1.0.2

License

MIT

Unpacked Size

44.6 kB

Total Files

15

Last publish

Collaborators

  • huksley