-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert rest.ts
to composition API
#1774
Conversation
d0f2791
to
4898e6e
Compare
@@ -278,12 +295,12 @@ client.interceptors.request.use((config) => ({ | |||
}, | |||
})); | |||
|
|||
const user = () => dandiRest.user; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this function is redundant now that we're using composition API. I made the necessary updates to the rest of the codebase to account for the fact that this is a Ref
instead of a function.
Is there a particular reason to keep the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tested locally. My only concern would be my other comment, but I still think we could merge this aside from that.
Sorry, I thought I added a comment describing that but clearly I didn't. Yes, I left the |
🚀 PR was released in |
The
rest
module seems to be blocking the upgrade to Vue 3; in Vue 2, it was possible to initialize a Vue object as follows:And then access a data object like this:
But, the equivalent Vue 3 code doesn't work:
I'm not sure what the issue is or how it was changed, but I can't even find the docs that specified this behavior for Vue 2. I'd be curious to hear if anyone has any ideas why that is. But regardless, converting to Composition API avoids this issue and is also something we've planned for a long time, so I just went ahead and did that.
Fixes #1267