Proposal to improve the experience of `useSession`
See original GitHub issueDescribe the feature
Hi! I’m João Pedro. I’m one of the maintainers of the nuxt 2 auth module 😃
So, currently, each time useSession is used it makes a request to the api to get the session, which means we have to await for the request and this makes the component asynchronous. And if it’s used in more than one component, it will make unnecessary requests.
My proposal is to use useSession only to get the data stored with useState, and fetch the session on load the page through a plugin.
This follows the same approach of the auth module, which fetches the user on load the auth plugin.
Additional information
No response
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Enhance user experience with simple and easy-to-use ...
Quick and easy visualization of user session information across your applications is crucial for ensuring a great user experience. Improve ...
Read more >How-To Videos - Session
In this video you will learn how to define which days and hours you're available for booking. See how your clients experience Session....
Read more >Five Tips for AU 2022 Proposal Success | Autodesk University
5. Emphasize your unique contribution ... What makes your class different from all the rest? What unique insight or experience or approach will ......
Read more >Cookie Policy - The Learning Ideas Conference
Anyone visiting our site may receive cookies from us. We use session cookies to improve your experience on this site. The Learning Ideas...
Read more >Proposals - National Resource Center for The First-Year ...
Proposals. The National Resource Center invites online proposal submissions. Concurrent sessions, facilitated dialogues, and vendor presentation proposals ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve gotten started (and already quite far) in #69. #69 will:
for another PR / issue:
As discussed: Let’s go ahead with this and make
useSessionsync (: