1 import streamlit as st
2 import streamlit.components.v1 as components
3
4 # ??? を使用して双方向(bi-directional)コンポーネントを宣言する
5 # このコンポーネントはPythonとJavaScript間でデータのやり取りが可能
6 my_component = components.???(
7 "my_component",
8 url="http://localhost:3001"
9 )
10
11 # コンポーネントを使用してデータのやり取り
12 result = my_component(name="Streamlit")
13 st.write("結果:", result)