Fork me on GitHub

@coyotespike: This may not necessarily be the source of the problem but have you tried assuring that password is derefed only once? As in (let [password @password] ... the body ... ). I assume that password is a reaction - and every deref of a reaction causes a rerender - I got bitten by it once in the beginning when working with rendering a data in the table


@coyotespike: That sort of code works beautifully for us, all the time. So you are doing something (probably simple) wrongly but absolutely don't resort to using domy, that's not the React way.


The code fragment you have supplied looks fine. What surrounds that if? a [:div ...] ? How does password get passed in? subscription? Can you add a [:pre (pr-str @password)] nearby so you can be sure it is changing value? It does seem clear that the value in password isn't getting set correctly.

Petrus Theron10:07:21

Can reagent components have multiple arity?

Petrus Theron10:07:03

@mikethompson: check that password is a ratom and not a regular atom. This gets me all the time.


@coyotespike: see line above (meant for you, not me, i think)


I did get dommy to work - the save-button calls a save function in another file, which on success uses dommy/hide! and so on. But I admit it's hackity.


@zoldar I did not know about deref'ing only once...let me try that.


So the password form should update the password atom should update the buttons.


Also, unlike every other atom, the password is not a subscription, and hence is not updated directly through a handler, which would probably make it easier (I don't want it in my app-db/BigRatom). @petrus so it is a ratom, but that shouldn't matter here. 😬


@coyotespike: honestly, don't use dommy. In this world, its not a hack, it's a full on abomination. I'd encourage you to figure out the bug.


It was a desperate move, I assure you! I am continuing to mess with it.


Figured out the issue with the password atom not updating! I made the Form-2 Rookie Mistake and didn't use an inner (fn []'d think I'd know better 😵...


Many thanks to everyone who chimed in!


Still working on the switching buttons thing...


@mikethompson - the switching buttons work! And yes, it's much prettier. Thanks for the encouragement and advice (and for Re-frame!) @zoldar: It only works for me when I deref the atom in each button and function. I'd be curious to see an example where you needed to deref in the let.