Table of Contents

Method UseSubmit

Namespace
Velvet
Assembly
Velvet.Docs.dll

UseSubmit()

Returns a function that submits form data to a route's action, or with a get method navigates with it as the query string: React Router's useSubmit. With no Action it submits to the route the calling component renders in, and a relative one resolves from there; SubmitAsync(object?, SubmitOptions?, CancellationToken) states the rest. The function keeps its identity across renders while the router and that route do.

public static SubmitFunction UseSubmit()

Returns

SubmitFunction

Exceptions

InvalidOperationException

No V.RouterProvider is mounted above the caller.