Table of Contents

Method Register

Namespace
Velvet
Assembly
Velvet.Docs.dll

Register(Func<BlockerFunctionArgs, bool>, RouteBlockerState)

Registers a Blocker. A router consults only the one registered last, as React Router's does. Disposing the registration removes the Blocker and returns state to Idle, whatever it was holding.

public IDisposable Register(Func<BlockerFunctionArgs, bool> shouldBlock, RouteBlockerState state)

Parameters

shouldBlock Func<BlockerFunctionArgs, bool>
state RouteBlockerState

Returns

IDisposable