(element: HTMLElement)
| 1 | import { mount, SimpleReactPyClient } from "@reactpy/client"; |
| 2 | |
| 3 | export function app(element: HTMLElement) { |
| 4 | const client = new SimpleReactPyClient({ |
| 5 | serverLocation: { |
| 6 | url: document.location.origin, |
| 7 | route: document.location.pathname, |
| 8 | query: document.location.search, |
| 9 | }, |
| 10 | }); |
| 11 | mount(element, client); |
| 12 | } |