Skip to content

The assync nature seems to make st_javascript not update every streamlit run #14

Description

@victorccaldas

Problem:
streamlit-javascript does not run or fails to run on each streamlit rerun.
I was using javascript to update a counter in localStorage for everytime I pressed an html button.
While the counter in localStorage returned 10, st_javascript returned 5.

Important note: The error continued after updating streamlit at each button click.

Probable cause:
The async nature of the javascript code passed to streamlit-javascript, as seen in result = await eval("(async () => {return " + js_code + "})()"),

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions