Licence
MIT
Version
4.0.3
Deps
1
Size
6 kB
Vulns
0
Weekly
0
solid-controlled-input
Porting over react controlled input behavior over to solid
Shouldn't this be the default behavior?
Well no, if you only have touched react, it actually heavily transforms events and inputs to get its behavior.
For example:
- React's
onChangefires on every input, while vanilla js doesn't - Vanilla JS does not have "controlled" inputs, you need to make them manually
How to use
import { ControlledInput, ControlledTextarea } from "solid-controlled-input";
That's it, use this input like you would use the og <input /> or <textarea />