# SnackbarModel

Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/core/src/ui/SnackbarModel.tsx).

Adds notifications to a session: the snackbar messages on screen, and the
error shown in the stack-trace dialog.

## Volatiles

| Member | Description |
| --- | --- |
| **snackbarMessages**<br><code>IObservableArray&lt;SnackbarMessage&gt;</code> |  |
| **errorDialog**<br><code>ErrorDialogState &#124; undefined</code> | the error currently shown in the stack-trace dialog. Kept off the dialog queue so it can stack on top of an already-open dialog (e.g. the one whose action raised the error) instead of waiting behind it |

## Getters

| Member | Description |
| --- | --- |
| **snackbarMessageSet**<br><code>Map&lt;string, SnackbarMessage&gt;</code> |  |

## Actions

| Member | Description |
| --- | --- |
| **notify**<br><code>(message: string, level?: NotificationLevel &#124; undefined, action?: SnackAction &#124; SnackAction[] &#124; undefined) =&gt; void</code> |  |
| **notifyError**<br><code>(errorMessage: string, error?: unknown, extra?: unknown, action?: SnackAction &#124; undefined) =&gt; void</code> |  |
| **setErrorDialog**<br><code>(state: ErrorDialogState &#124; undefined) =&gt; void</code> |  |
| **pushSnackbarMessage**<br><code>(message: string, level?: NotificationLevel &#124; undefined, actions?: SnackAction[] &#124; undefined) =&gt; void</code> |  |
| **popSnackbarMessage**<br><code>() =&gt; SnackbarMessage &#124; undefined</code> |  |
| **removeSnackbarMessage**<br><code>(message: string) =&gt; void</code> |  |

