In that case you'd want to make a component that would post the state to the backend. You can use Idyll's variables to pass the state to the component that sends the request.
For example, here is a page that uses firebase to persist state https://mathisonian.github.io/idyll/firebase/. The custom components for that page are here https://github.com/mathisonian/idyll/tree/master/firebase/co...