Reducing use of ref and reactive. #485
Closed
yogeshgalav
started this conversation in
General
Replies: 2 comments 10 replies
-
Not every variable usage needs to be transformed back to |
Beta Was this translation helpful? Give feedback.
10 replies
-
I got all my answers in this conversation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem:
The new reactivity transform makes things even more confusing and hard for beginners. Instead of making things better then svelte, the community is making things hard to understand.
Use of ref and reactive is difficult to understand for beginners, hence simplification or abstraction is required for sure.
Solution:
Instead of using new properties, what if we just use $ dollar sign to represent all reactive variables.
We can transform the variable declaration (const | let | var) like below
with something like
And transform the variable usage like this
with
The basic idea here is to simplify most of the basic code (for beginners) and other features like ref and reactive might remain same for core part and better usage.
I love the way Vue3 code feels like normal Javascript code,
But it could be easier and more loveable with above mentioned feature.
Whole Php will not only embrace it but also may became addictive to vue.
thanks for your time to read this.
Beta Was this translation helpful? Give feedback.
All reactions