reflex
reflex copied to clipboard
Cannot index dict for props from State object
Error:
x Expected unicode escape
,----
45 | <Center sx={{"paddingBottom": "15%", "bg": state.palette[\"bg2\"], "height": "100vh", "width": "100wh"}}><VStack spacing="1.5em"
: ^
`----
Caused by:
0: failed to process input file
1: Syntax Error
You get an error like this when trying to index from a State dict for prop values, object is a State computed var and is type hinted with dict.
Solution would maybe be to get rid of the backslahes? Idk, can the css even access state props?
Got it thanks for pointing this out
It is related to this PR. https://github.com/pynecone-io/pynecone/pull/683