search

Home  >  Q&A  >  body text

javascript - How to use redux to manage user refresh on WeChat official account webpage?

The HTML page of the WeChat official account uses redux to save data, but if the page is refreshed, the saved data will inevitably be cleared. So the question is, how to save this data? How to save this data elegantly? Can the refreshed interface still retain its state?

仅有的幸福仅有的幸福2752 days ago939

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-06-26 10:55:53

    The data is stored in the memory, and js will be re-executed after refreshing. Redux data will be lost. It can be stored in localStorage or indexedDB or request ajax to get the data from the server and assign it to redux.

    reply
    0
  • Cancelreply