You don't need to dereference in render because cursors generally won't be
stale during render. If that's not the case then do it. But it's unusual to
need to do so.

David

On Wed, Jun 10, 2015 at 12:01 PM, J David Eisenberg <
[email protected]> wrote:

> On Wednesday, June 10, 2015 at 8:54:18 AM UTC-4, David Nolen wrote:
> > I don't understand why you need to put something like that into app
> state. Seems like component local state is better suited.
> >
> >
> > David
> >
>
> Eventually I will have several interdependent input fields, but I wanted
> to give as close to a minimal example of the question as possible (since
> that seems to be a theme in this group). I'm still confused as to why I
> need to de-reference, even though the wiki seemingly tells me not to do so.
>
>
> >
> > On Wed, Jun 10, 2015 at 6:34 AM, J David Eisenberg <
> [email protected]> wrote:
> > I want to initialize a form field dynamically. In this short example
> gist: https://gist.github.com/jdeisenberg/f8b3da0d30ca87df01a3 I want to
> initialize the text field with the current minute of the hour (hey, it's
> just an example).
> >
> >
> >
> > As coded, it doesn't work. If I change data to @data in lines 30 and 32,
> it works great. But, according to
> https://github.com/omcljs/om/wiki/Cursors, I should *not* do that --
> "During the render phase, you treat a cursor as a value, as a regular map
> or vector."  What am I misreading here?
> >
> >
> >
> > --
> >
> > Note that posts from new members are moderated - please be patient with
> your first post.
> >
> > ---
> >
> > You received this message because you are subscribed to the Google
> Groups "ClojureScript" group.
> >
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >
> > To post to this group, send email to [email protected].
> >
> > Visit this group at http://groups.google.com/group/clojurescript.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to