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

computed getter #29

Open
hyusetiawan opened this issue Jan 11, 2023 · 1 comment
Open

computed getter #29

hyusetiawan opened this issue Jan 11, 2023 · 1 comment

Comments

@hyusetiawan
Copy link

Can we change the way computed works when it comes to getter functions? Currently, it's not listened to, though I can add a listener and set it as a property value instead, ex:
instead of get value() I create a computed then inside that callback I assign the new value to .value
Is it possible instead, to make the getter functions to be automatically computed? This behavior mimics mobx but i do see an improvement in DX as it is arguably more straightforward

@elbywan
Copy link
Owner

elbywan commented Jan 12, 2023

Is it possible instead, to make the getter functions to be automatically computed?

Yes I guess it would be possible to add a new option to observe which would turn getter functions into computed.

I don't have a lot of spare time but I will look into it eventually 👍.

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

No branches or pull requests

2 participants