Fork me on GitHub
#reagent
<
2015-10-19
>
gadfly36103:10:50

PSA: there are updated devcards + reagent docs: http://rigsomelight.com/devcards/#!/devdemos.reagent - thanks @bhauman!!

Pablo Fernandez07:10:47

What’s the best way to reset forms with uncontrolled inputs?

danielbraun09:10:11

1. make them controlled 2. unmount the form component completely and mount it again somehow

danielbraun09:10:12

another option is to add a type=reset button, see what happens

andrewvida18:10:42

Does anyone have an example of how they're doing initial state setup? Say calling an API to get initial data?

eggsyntax23:10:22

I just create a go block in which I hit the API, with a callback that does nothing but change the value of a reagent ratom to match the returned value. Then any reagent components that deref the ratom will be rerendered appropriately once the value's returned.

eggsyntax23:10:01

Not sure if that answers your question; I'm not sure what you're after. Also disclaimer: I'm not a reagent guru at all, just a happy user of it simple_smile