[FR] Preserve states like React's state variables
What problem does this feature solve?
Currently, when editing code in <script>
, the states will be discarded, it's particularly obvious when using render functions instead of templates, since modifying a style in render function will lose states of the edited component, it'd be great if Vue could remember the states like React's state variables. This way, the developer experience for writing render functions will be hugely improved.
What does the proposed API look like?
Preserve states like React's state variables.