Skip to content

Composition API - Creating computed outside of setup or a composition function #9779

Discussion options

You must be logged in to vote

computed is a feature in @vue/reactivity, and you can use it anywhere. If a variable is only needed within a component, it is recommended to use it in the component's setup. However, if you have other requirements, you can use it anywhere without causing memory leaks. How you ultimately use it depends on your business needs.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gduliscouet-ubitransport
Comment options

Answer selected by gduliscouet-ubitransport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants