Skip to main content

REFERENCE

SDK Demos

How to use @asgard-js/core and @asgard-js/react, with demos you can try on the page.

Keep Connection (keepConnectionOnUnmount)

By default, <Chatbot> aborts the in-flight SSE connection when it unmounts. Setting keepConnectionOnUnmount to true lets an in-flight round finish on the backend when the component unmounts because the user navigated to another in-app page; the connection auto-closes once the run completes (or after a safety timeout).

Note: this only covers in-app unmounts. A full page reload, tab close, or network loss still tears the connection down, since the page itself is gone.

  1. Code Example​

    <Chatbot
    keepConnectionOnUnmount
    config={{ botProviderEndpoint: "..." }}
    customChannelId="your-channel-id"
    {...rest}
    />
  2. Further Reading​

Ready to get started?

Want to see how Asgard fits your team? Talk to us.

Contact us