Skip to content
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

feat(resolveRef): new function #1743

Merged
merged 4 commits into from Jul 6, 2022
Merged

feat(resolveRef): new function #1743

merged 4 commits into from Jul 6, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented Jul 4, 2022

This will enable some scenarios to have a function getter as MaybeRef (Refactor of the codebase will be done in future PRs).

For example, currently we have to:

const title = computed(() => `${foo} | template`)
useTitle(title)

Later it will be possible to have:

useTitle(() => `${foo} | template`)

@antfu antfu mentioned this pull request Jul 4, 2022
8 tasks
@@ -0,0 +1,20 @@
---
category: Utilities
related: resolveRef
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related: resolveUnref

@@ -0,0 +1,20 @@
---
category: Utilities
related: resolveUnref
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related: resolveRef

@webfansplz
Copy link
Member

Nice, It's so useful for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants