NoticeStore.show()method
Update the notice's content and status, resetting its auto-close timer.
show(children?: ReactNode | undefined, status: S | undefined = this.value.status): void
new NoticeStore<S>(notices: NoticesStore<S>, children?: ReactNode | null, status?: S | undefined)
| Param | Type | |
|---|---|---|
notices | NoticesStore<S> | The parent store to add this notice to. required |
children | ReactNodenull | The notice content (optional). |
status | S | The notice status (optional). |
| Return | |
|---|---|
NoticeStore<S> | Store holding a single notice's content and status, owned by a NoticesStore. |
| Property | Type | |
|---|---|---|
.key | unknown | Defaults to getRandomKey() readonly |
Store holding a single notice's content and status, owned by a NoticesStore.
"loading".NoticesStore on construction and removes itself on close() or disposal.const notice = notices.show("Saved", "success"); notice.close();Update the notice's content and status, resetting its auto-close timer.
show(children?: ReactNode | undefined, status: S | undefined = this.value.status): void
Close this notice permanently, removing it from its parent NoticesStore.
close(): void