BrickActionsinterface
import { BrickActions } from '@mortar-kit/core'
interface BrickActionsHow the app connects brick forms to the server. Provide it with
BrickActionsContext around the site; without it, a <ActionForm>
renders but doesn't post anywhere.
Properties
action: (ref: EntryRef) => string | SerializableAttributeValueThe
actionattribute of an entry's form: the URL (or the router's form action) its post goes to.useSubmission: (ref: () => EntryRef) => () => Submission<unknown> | undefinedThe entry's latest submission, for its component. Called once per entry while rendering (hooks are fine);
refis an accessor because an entry can move to another document in the admin preview.submit?: (ref: EntryRef, form: FormData) => voidSends an entry's form in the background. When present,
<ActionForm>stops the browser's own post and calls it; without it, the post goes toaction(ref)(where a router may take it over).islandActionshas it.