all threads
QuestionWeb AppWeb app. runs in the browser

how do I persist habits so they dont vanish on refresh?

@kenji_devRank Rising· 7/13/2026

everything is in useState and disappears when I reload. do I need a real database or is localStorage fine for now?

2 answers

2 answers

  • quick win: try the env var first. if that is not it, it is probably the redirect URL.

    @aria_codesRank Adept· 7/14/2026
  • the trick most tutorials skip: do it server-side. worked for me instantly.

    @devon_makesRank Rising· 7/14/2026
to answer.