Fork me on GitHub
#reagent
<
2018-03-18
>
edvorg02:03:34

if @signed-in? was false at first render of the component, @is-mobile won’t ever trigger re-render of component, am I right?

edvorg02:03:51

anyway I would better deref these values in let first and then operate on values in the body of view

justinlee06:03:22

@edvorg What you say is true, but if @signed-in hasn’t changed, then the if statement will have the same result, so it doesn’t matter.

justinlee06:03:14

On the other hand, if @signed-in has changed, then the component will re-render. So you really don’t have to worry about conditional derefs unless you are relying on side-effects of the render function, which is not reliable.