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

if I mount some properties on a function,these properties will disappear when the function is passed #687

Closed
shlroland opened this issue Apr 23, 2021 · 2 comments · Fixed by #778
Labels
bug Something isn't working

Comments

@shlroland
Copy link

here‘s a demo

i cann't take the other properties which mounted on the function

@pikax pikax added the bug Something isn't working label Apr 23, 2021
@ygj6
Copy link
Member

ygj6 commented Apr 27, 2021

@shlroland
Change:
const testFn = () => { console.log(1); };
To:
const testFn = ref(() => { console.log(1); });

will solve your problem!

In composition-api, we should using reactive or ref API to declare reactive state, so does the testFn

@ygj6
Copy link
Member

ygj6 commented May 4, 2021

@shlroland Sorry, the description is not clear. Please refer to this link for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants