reconnect and connection cleanup working

This commit is contained in:
Chris Oloff 2025-11-18 12:51:30 +02:00
parent 2fba3350ec
commit 794bac9231
2 changed files with 66 additions and 3 deletions

16
sample.py Normal file
View file

@ -0,0 +1,16 @@
import panel
from watt42_viewlib import attach_w42_state
w42_state = panel.rx(None)
attach_w42_state(rx_var=w42_state, system_id="fb2b91ce-383e-4356-96b3-b6405dacb353")
state_as_text = panel.bind(lambda s: f"State is {s}", w42_state)
state_pane = panel.pane.Markdown(state_as_text, sizing_mode='stretch_width')
_ = panel.template.FastListTemplate(
title="Sample W42 View App",
sidebar=[panel.pane.Markdown("This is a sample sidebar.")],
main=[panel.pane.Markdown("Welcome to the main content area!"), state_pane],
).servable()