Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA comment box that shows the new comment at once, marks it as sending, and takes it back with a message and the text restored if the server refuses. Use this when waiting for the server before showing the comment would feel slow.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
A post, comment or message should appear instantly, and the rare failure can be undone cleanly.
Do not use it when: When the action has side effects the person must see confirmed (payments, deletions), wait for the server.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Description |
|---|---|---|
initial | Comment[] | The comments already saved. |
send | (text) => Promise<Comment> | Save the comment; reject to roll back. |
author | string | Name shown on the pending comment. |
aria-busy and the visible text "Sending..." (not only reduced opacity).The pattern ships with a Testing Library test (server-action-comment-optimistic.test.tsx) that covers: its main behaviour, the keyboard path and the error or empty states.