Skip to content

Do I have to use lambda for rx.foreach? #3275

Closed Answered by Dekubaka
Dekubaka asked this question in Q&A
Discussion options

You must be logged in to vote

I asked the discord. I was close but the alternative was

def chat() -> rx.Component:
    return rx.box(
        rx.foreach(
            State.chat_history,
            test
        )
    )

def test(messages):
    return qa(messages[0], messages[1])

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Dekubaka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant