Skip to main content

@tairu/react

React client for Tairu tiles.

Installation

npm install @tairu/react

Type Aliases

LoadErrorProps

LoadErrorProps: object

Type declaration

error

error: Error

retry()

retry: () => void

Returns

void


LoadingProps

LoadingProps: object

Type declaration

renderer

renderer: ReactRenderer


PostErrorProps

PostErrorProps: object

Type declaration

element

element: ReactNode

error

error: Error

loadedTile

loadedTile: TileV0


PostingProps

PostingProps: object

Type declaration

element

element: ReactNode

loadedTile

loadedTile: TileV0


ReactRenderer

ReactRenderer: Renderer<ReactNode>


TileRendererProps

TileRendererProps: UseTileElementParams & object

Type declaration

renderLoadError()

renderLoadError: (props) => ReactNode

Parameters
props

LoadErrorProps

Returns

ReactNode

renderLoading()?

optional renderLoading: (props) => ReactNode

Parameters
props

LoadingProps

Returns

ReactNode

renderPostError()?

optional renderPostError: (props) => ReactNode

Parameters
props

PostErrorProps

Returns

ReactNode

renderPosting()?

optional renderPosting: (props) => ReactNode

Parameters
props

PostingProps

Returns

ReactNode


UseActionHandlerParams

UseActionHandlerParams: object

Type declaration

handleOpenURI()

handleOpenURI: (uri) => void

Parameters
uri

string

Returns

void

postAction

postAction: PostActionHandler

signer

signer: ActionSigner


UseTile

UseTile: object

Type declaration

isLoading

isLoading: boolean

isPosting

isPosting: boolean

loadError?

optional loadError: Error

postAction

postAction: PostActionHandler

postError?

optional postError: Error

retryLoading()

retryLoading: () => void

Returns

void

tile?

optional tile: TileV0


UseTileElement

UseTileElement: object

Type declaration

element

element: ReactNode

isLoading

isLoading: boolean

isPosting

isPosting: boolean

loadError?

optional loadError: Error

postError?

optional postError: Error

retryLoading()

retryLoading: () => void

Returns

void

tile?

optional tile: TileV0


UseTileElementParams

UseTileElementParams: object

Type declaration

handleOpenURI()

handleOpenURI: (uri) => void

Parameters
uri

string

Returns

void

onLoadError()?

optional onLoadError: (error) => void

Parameters
error

Error

Returns

void

onPostError()?

optional onPostError: (error) => void

Parameters
error

Error

Returns

void

onTileChanged()?

optional onTileChanged: (tile) => void

Parameters
tile

TileV0

Returns

void

onTileLoaded()?

optional onTileLoaded: (tile) => void

Parameters
tile

TileV0

Returns

void

options?

optional options: LoaderOptions

renderer

renderer: ReactRenderer

signer

signer: ActionSigner

url

url: string


UseTileParams

UseTileParams: object

Type declaration

loader?

optional loader: Loader

options?

optional options: LoaderOptions

signer?

optional signer: ActionSigner

url

url: string

Functions

TileRenderer()

TileRenderer(props): ReactNode

Parameters

props

TileRendererProps

Returns

ReactNode


useActionHandler()

useActionHandler(params): ActionHandler

Parameters

params

UseActionHandlerParams

Returns

ActionHandler


useTile()

useTile(params): UseTile

Parameters

params

UseTileParams

Returns

UseTile


useTileElement()

useTileElement(params): UseTileElement

Parameters

params

UseTileElementParams

Returns

UseTileElement