• r

    rp

    8 months ago
    It should be initialised in the global scope.
  • r

    rp

    8 months ago
    Basically, before calling any other function related to supertokens.
  • s

    smoleniuch

    8 months ago
    is there any way to apply dynamic handlers for events?
  • s

    smoleniuch

    8 months ago
    i would love to have my redux store with current user status etc
  • r

    rp

    8 months ago
    You could hold a refrrence to your redux store in the global scope and dispatch events to it from our functions
  • r

    rp

    8 months ago
    If I misunderstood your question, perhaps some code for what you are trying to do would help.
  • s

    smoleniuch

    8 months ago
    I dont think its possible in my case due to store initialization inside main component. If im not mistaken i was forced to do so because of Server Side Rendering.
  • r

    rp

    8 months ago
    Hmmm. You can have a check if this is in the client or server side by doing if (typeof window !== “undefined”)
  • s

    smoleniuch

    8 months ago
    I guess you are right, but i will try to use
    EmailPasswordSignUpForm
    and
    EmailPasswordSignInForm
    component. Seems like easier thing to do in my case.I will check if session exists on my main component and update store when user lands on my website.
  • s

    smoleniuch

    8 months ago
    Thanks for support!