This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@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
[: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.
@mikethompson: check that password is a ratom and not a regular atom. This gets me all the time.
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.
@mikethompson: I'm working off the login form here. https://dhruvp.github.io/2015/02/23/mailchimip-clojure/
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.
Figured out the issue with the password atom not updating! I made the Form-2 Rookie Mistake and didn't use an inner
(fn  ...you'd think I'd know better 😵...https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components
@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