Skip to content

Save values on page reload #15773

Answered by mikesealey
bartlebi asked this question in Help

You must be logged in to vote

Hey @bartlebi - I'm sorry to hear you're having this issue. Let's get stuck in -

Firstly, we can check if there's a bug with state values persisting with a simple screen - I've got a text field, a button that sets the state using the value from the field, and a headline component to display the state.

For the On-Click actions of the button, we take the value of New Text Field and save it to the key of 'value', making sure to check the "Persist this value" option.

When we publish the app, I can then add a value, save it to state, and see it reflected in the headline component. Refreshing the page will maintain the text saved in the state.

Demonstrated here: https://jam.dev/c/3821fb19-b3d5…

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by mikesealey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants