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

Minor #10999

Closed
wants to merge 31 commits into from
Closed

Minor #10999

wants to merge 31 commits into from

Conversation

1109176988
Copy link

@1109176988 1109176988 commented May 23, 2024

This commit adds a new function called ref to the core of the codebase. The ref function allows developers to create reactive ref objects, which include a value property and a reset method. Internally, the ref function utilizes the existing reactive function to create the reactive object.

This change addresses the need for an easier way to create reactive ref objects. Previously, developers had to manually implement this functionality, leading to code duplication and potential errors. With the ref function, creating reactive ref objects becomes simpler and more consistent.

yyx990803 and others added 30 commits February 25, 2024 16:51
ref vuejs#10173

Instead of exposing `getCurrentEffect`, this version accepts a second
argument to suppress the no-active-effect warning.
This commit adds a new function called `ref` to the core of the codebase. The `ref` function allows developers to create reactive ref objects, which include a `value` property and a `reset` method. Internally, the `ref` function utilizes the existing `reactive` function to create the reactive object.

This change addresses the need for an easier way to create reactive ref objects. Previously, developers had to manually implement this functionality, leading to code duplication and potential errors. With the `ref` function, creating reactive ref objects becomes simpler and more consistent.

Details:
- Define the `ref` function to create reactive ref objects
- Include a `value` property in the ref object
- Implement the `reset` method to reset the value property to its initial value

Footer:
- Closes: vuejs#674
Copy link

netlify bot commented May 23, 2024

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit 1c790c2
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/664efafbb58726000828ae9f

Copy link

netlify bot commented May 23, 2024

Deploy Preview for vue-next-template-explorer failed.

Name Link
🔨 Latest commit 1c790c2
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/664efafbb955dc0008e610a6

@sxzz sxzz closed this May 23, 2024
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.

10 participants