stlite
stlite copied to clipboard
Custom element syntax
Found that the JS-based syntax has one clear downside that developers have to take care of escaping some characters such as backtick (`) and backslash (\).
Ref:
https://github.com/whitphx/stlite/blob/db36554dfcc98d1fa53d6d90725ab061e46ae159/packages/sharing-editor/src/export/html.ts#L13-L18
Custom element syntax like below allows developers to write the Python code without such cares.
<stlite-app>
import streamlit as st
st.write("Hello World")
</stlite-app>