Replies: 2 comments
-
Ah, that's two different questions I think :-) Page props here is used to allows the If you are only using client side rendering and As for checking it's behaving correctly, you could this monitoring the network requests that get made and repeating a series of steps (manually or , ideally with an automated test) and enabling debug logging and comparing traces with different flows or by observing network requests that are triggered in the browser. Note if doing it manually events like window focus changes will trigger re-syncing of session data. The amount of manual regression testing is an issue right now and is the current focus (and why a bunch of PRs are on hold while that is being resolved). |
Beta Was this translation helpful? Give feedback.
-
Related: I'm also considering improving the client behaviour, to give more control and possibly to fire events that can be subscribed to on the client (which could also be used to track something like this). The current behaviour works fairly well, but I think there is room for optimisation, and perhaps allowing more control of when it happens (e.g. if there should be auto-updating when window focus state changes or not, should the cache be used more aggressively and apply even to focus state changes?) but it will probably be looked at after we have better testing in place. (I think most people won't notice or care about the improvements and they can be entirely transparent, but something it would be nice to revisit. I'd also like to improve the behaviour that happens when NOT using the provider, but that's a bit of an edge case right now and would strongly encourage everyone to use it as it makes the user experience much better.) |
Beta Was this translation helpful? Give feedback.
-
pageProps.session
in the code below is always undefined. How can we test if this provider indeed reduces the number of times useSession() calls the api?note: I realized I am using the email provider only. Maybe this is the reason? Question about how can we see if it optimizes useSession() still stands
Beta Was this translation helpful? Give feedback.
All reactions