Closed SlonSky closed 1 week ago
Tried to reproduce it on latest main, but your code snippet is working for me.
@SlonSky I believe this is because somewhere your ExampleState.items
is being set to None
rather than an empty list. Then in Javascript, it's unable to call the map
function leading to this error.
Describe the bug
When I try to render list that is produced by computed state var, I encounter Server Error "TypeError: Cannot read properties of undefined (reading 'map')"
To Reproduce
Expected behavior
the
rx.foreach
will render 10 text elementsScreenshots
Specifics (please complete the following information):
Additional context
Very similar to the old issue https://github.com/reflex-dev/reflex/issues/1886 and the same hack works:
Also, everything works when the state var isn't computed (however it forces us to have some event handler that constatly updates the var):
REF-3192