Memberstack is not refreshing data when I use a Javascript framework

Article author
Josh Lopez

Because most frameworks do not fully refresh the page your Memberstack data may not be updating on the page. Some frameworks we have seen this happen in are React and Vue.


If you need to reload the Memberstack.js script use:

 

window.MemberStack.reload()

 

Reloading the Memberstack.js script will help when a page is not fully reloaded and Memberstack is not working. Known circumstances in which this happens is with Vue and React routers.

Was this article helpful?

Comments

3 comments

  • Comment author
    Michelle K
    • Edited

    I've found location.reload() to reload the whole pGE from other posts but wondered if it's possible to reload just the js like above with 2.0?

    1
  • Comment author
    Josh Lopez

    Hey Michelle K,

    How are you using the .reload functionality in 2.0? You may not have to reload.

    1
  • Comment author
    Michelle K
    • Edited

    Hi Josh Lopez

    I'm using Memberstack on a notion and super.so site and am having an issue where gated content is not working due to caching. Members without access to content are able to access it and only on refresh of page are they redirected to the access denied url. The problem is explained here - https://community.super.so/c/questions/memberstack. The solution on 1.0 in this article includes a script that has the above reload and I want to modify it to work for 2.0. That's why I am hoping there is an equivalent line to window.Memberstack.reload() for 2.0. Is an equivalent script possible?

    1

Please sign in to leave a comment.