4 ms·
I wonder if this could be solved with a general jsx decorators feature? For example: <input @bind("username") name="username" /> ...where bind is a normal
by simplify 8y ago
I wonder if this could be solved with a general jsx decorators feature? For example:
<input @bind("username") name="username" />
...where bind is a normal function in scope that receives the element and/or its props?
- yayr 8y agothere are various ways to put this into a syntax. one way would be to have a dedicated attribute that behaves this way for relevant components. This would then be similar to the vue.js approach https://vuejs.org/v2/guide/forms.html https://vuejs.org/v2/guide/forms.html <input model={myJsObject.text} /> or <input bindValue={myJsObject.text} /> At least for standard HTML components this should work, as they would only have one editable property.