reflex
reflex copied to clipboard
pc.foreach doesn't handle correctly the State.slug var from catchall argument
Describe the bug
When using a catchall route "path/[...slug]", the slug ComputedVar is correctly created, but it can't be passed to the pc.foreach component, because it is detected as a wrong type.
To Reproduce Steps to reproduce the behavior:
def catchall_index():
return pc.foreach(State.slug, lambda arg: pc.text(arg))
app.add_page(catchall_index, path="path/[...slug]")
app.compile()
Expected behavior
foreach should iterate correctly on the State.slug method
Screenshots
The traceback that occurs:

** Specifics (please complete the following information):**
- Python Version: 3.10
- Pynecone Version: main branch
Additional infos : The problem was previously discussed on the discord, in the thread : "Dynamic Routes"