reagent-project / reagent

A minimalistic ClojureScript interface to React.js
http://reagent-project.github.io/
MIT License
4.74k stars 412 forks source link

Update docs? #588

Closed reutsharabani closed 1 year ago

reutsharabani commented 1 year ago

I've recently been fiddling with materiual-ui and ran into the cursor position problem with inputs.

I found out (using google) that setting :defaultValue instead of :value solves my problems (although I'm using it in a very basic manner). I'm not sure why, but it works for now. I didn't want to use reagent stuff since I'm actually using re-frame on top of it.

I think you should consider adding this tip in the material UI page (and examples).

Thanks.

Deraen commented 1 year ago

https://reactjs.org/docs/uncontrolled-components.html https://beta.reactjs.org/reference/react-dom/components/input#controlling-an-input-with-a-state-variable https://github.com/reagent-project/reagent/blob/master/doc/ControlledInputs.md

I added a mention of controlled vs uncontrolled inputs to the MUI doc.