SolidJSS
SolidJSβ€’15mo agoβ€’
5 replies
snorbi

Handling <input>

Is this a correct way to handle <input> fields?

<input onInput={e => setUserName(e.target.value)} value={userName()} />

Or should I use a ref instead and read the field value when it is needed?

Is there a concept of "controlled input" in solidjs?
Or only "uncontrolled input"?

Thanks.
Was this page helpful?