ntjess
ntjess
Explore posts from servers
SSolara
Created by ntjess on 11/18/2024 in #questions-issues
State updates don't trigger page rerender in some cases
I have a @solara.component that immediately sets a reactive state to True. When this happens, the page fails to rerender:
import solara as sl


@sl.component
def MakeTrue(variable: sl.Reactive[bool]):
variable.set(True)


@sl.component
def Page():
x = sl.use_reactive(False)
MakeTrue(x)
sl.Text(str(x.value))
# Prints "False"

Page()
import solara as sl


@sl.component
def MakeTrue(variable: sl.Reactive[bool]):
variable.set(True)


@sl.component
def Page():
x = sl.use_reactive(False)
MakeTrue(x)
sl.Text(str(x.value))
# Prints "False"

Page()
Is this expected behavior?
5 replies
SSolara
Created by ntjess on 10/1/2024 in #questions-issues
Console error rendering markdown links in `solara.Markdown`
import solara
solara.Markdown("[a link](https://www.google.com)")
import solara
solara.Markdown("[a link](https://www.google.com)")
This code produces the following stack trace in the Chrome dev console:
Uncaught (in promise) TypeError: href.starswith is not a function
at VueComponent.setupRouter (eval at <anonymous> (VueTemplateRenderer.js:351:21), <anonymous>:35:33)
at eval (eval at <anonymous> (VueTemplateRenderer.js:351:21), <anonymous>:24:58)
at NodeList.forEach (<anonymous>)
at VueComponent.mounted (eval at <anonymous> (VueTemplateRenderer.js:351:21), <anonymous>:24:40)
Uncaught (in promise) TypeError: href.starswith is not a function
at VueComponent.setupRouter (eval at <anonymous> (VueTemplateRenderer.js:351:21), <anonymous>:35:33)
at eval (eval at <anonymous> (VueTemplateRenderer.js:351:21), <anonymous>:24:58)
at NodeList.forEach (<anonymous>)
at VueComponent.mounted (eval at <anonymous> (VueTemplateRenderer.js:351:21), <anonymous>:24:40)
Is there a way to avoid the error?
3 replies
SSolara
Created by ntjess on 9/23/2024 in #questions-issues
Example vue component using `<script setup>` pattern?
There are numerous helpful templates in solara's vue components. However, they all use the Options API, including in the vuetify and ipyvuetify documentation. Can you provide an example Composotion API example that shows how to expose data attributes, calling JS functions, etc.? Does it all work the same way? Thanks for the amazing library, by the way!
11 replies
CCoder.com
Created by ntjess on 5/22/2024 in #help
`workspace is unhealthy` error in `docker-compose` coder installation
No description
7 replies