···200200 <p>No new messages</p>
201201{:else}
202202 <ul>
203203- {#each $messages.data as message}
203203+ {#each $messages.data.newMessages as message}
204204 <li>{message.from}: "{message.text}"</li>
205205 {/each}
206206 </ul>
···208208209209```
210210211211-As we can see, the `$messages.data` is being updated and transformed by the `handleSubscription`
212212-function. This works over time, so as new messages come in, we will append them to
211211+As we can see, `$messages.data` is being updated and transformed by the `$messages` subscriptionStore. This works over time, so as new messages come in, we will append them to
213212the list of previous messages.
214213215215-[Read more about the `subscription` API in the API docs for it.](../api/svelte.md#subscription)
214214+`subscriptionStore` optionally accepts a second argument, a handler function, allowing custom update behavior from the subscription.
215215+216216+[Read more about the `subscription` API in the API docs for it.](../api/svelte.md#subscriptionstore)
216217217218## Vue
218219