We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, every time reactiveComputed dependencies get updated - reactiveComputed resets to initial state Example:
reactiveComputed
const test = ref(0); const obj = reactiveComputed(() => ({ test: test.value, num: 2 })); // { test: 0, num: 2 } obj.num = 5; console.log(obj) { test: 0, num: 5 } test.value = 1; console.log(obj); // { test: 1, num: 2 } - **num** has been reset
It would be a great solution to add prev param to reactiveComputed callback:
const test = ref(0); const obj = reactiveComputed( (prev) => ({ test: test.value, num: prev.num ?? 2 }) // { test: 0, num: 2 } ); obj.num = 5; console.log(obj); { test: 0, num: 5 } test.value = 1; console.log(obj); // { test: 1, num: 5 }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Clear and concise description of the problem
Currently, every time
reactiveComputed
dependencies get updated -reactiveComputed
resets to initial stateExample:
Suggested solution
It would be a great solution to add prev param to
reactiveComputed
callback:Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: