Thank you for your answer but next
Thank you for your answer, but next question, why display(button) from widget on solara component doesn' t appear on my codes:
import solara
import ipywidgets as widgets
github_url = solara.util.github_url(file)
some app state that outlives a single page
app_state = solara.reactive(0)
clicks = 0
def on_click(button):
global clicks
clicks += 1
button.description = f"Clicked {clicks} times"
button = widgets.Button(description="Clicked 0 times")
button.on_click(on_click)
@solara.component
def Page():
with solara.Sidebar():
solara.Button(label="Juristech", attributes={"href": "https://www.google.com/", "target": "_blank"}, text=True, outlined=True)
solara.Markdown("")
solara.Button(label="Surveyour Optimization", attributes={"href": "https://www.google.com/", "target": "_blank"}, text=True, outlined=True)
with solara.Card("Project Juristech"):
solara.Markdown("Grafik Juristech:")
display(button)
@solara.component def Layout(children): return solara.AppLayout(children=children)
@solara.component def Layout(children): return solara.AppLayout(children=children)
1 Reply
You need to create a new widget for each browser page, so if you put it in the Page component, it will work