()
| 122 | |
| 123 | @rx.page() |
| 124 | def index(): |
| 125 | mc_a = MultiCounter.create(id="a") |
| 126 | mc_b = MultiCounter.create(id="b") |
| 127 | mc_c = multi_counter_func(id="c") |
| 128 | mc_d = multi_counter_func(id="d") |
| 129 | assert mc_a.State != mc_b.State |
| 130 | assert mc_c.State != mc_d.State |
| 131 | return rx.vstack( |
| 132 | mc_a, |
| 133 | mc_b, |
| 134 | mc_c, |
| 135 | mc_d, |
| 136 | rx.button( |
| 137 | "Inc A", |
| 138 | on_click=mc_a.State.increment, # pyright: ignore [reportAttributeAccessIssue, reportOptionalMemberAccess] |
| 139 | id="inc-a", |
| 140 | ), |
| 141 | rx.text( |
| 142 | mc_a.State.get_name() if mc_a.State is not None else "", |
| 143 | id="a_state_name", |
| 144 | ), |
| 145 | rx.text( |
| 146 | mc_b.State.get_name() if mc_b.State is not None else "", |
| 147 | id="b_state_name", |
| 148 | ), |
| 149 | ) |
| 150 | |
| 151 | |
| 152 | @pytest.fixture |
nothing calls this directly
no test coverage detected