OK let me try this:

(render [_] (dom/h1 nil (:text app)))

App is a cursor but here we are happily getting the :text member of its
value by pretending app is the value.

(Something something (f app))

App is a cursor but here I am not magically given its value.

Discuss.
2014/9/3 上午7:41 於 "David Nolen" <[email protected]> 寫道:

> Or I simply don't understand the problem or the question :)
>
> On Wed, Sep 3, 2014 at 10:30 AM, Alan Shaw <[email protected]> wrote:
> > Wow you simply have not taken the time to read my question.
> >
> > 2014/9/3 上午7:28 於 "David Nolen" <[email protected]> 寫道:
> >
> >> If for some reason you need to snapshot the value of a cursor during
> >> render use om.core/value to do that.
> >>
> >> David
> >>
> >> On Wed, Sep 3, 2014 at 10:25 AM, Alan Shaw <[email protected]> wrote:
> >> > Setting local state from app state was not my goal. My goal was to
> >> > reflect
> >> > the changed app state in the display - not an unreasonable desire. If
> >> > you
> >> > read my question again you'll see that setting local state was only
> one
> >> > of
> >> > three ways I tried to accomplish that.
> >> >
> >> > Again: I was unable to access the cursor's value during the render
> phase
> >> > without explicitly saying (.value cursor). Examples in the tutorials
> >> > show
> >> > the cursor's value available by implicit dereferencing:
> >> >
> >> > (render [_] (dom/h1 nil (:text app)))
> >> >
> >> > It is my impression that rendering the value requires access to the
> >> > value.
> >> > But when I refer to this app state in render, I get the cursor rather
> >> > than
> >> > its value.
> >> >
> >> > I appreciate that breaking Om's rules will lead to trouble. I am
> trying
> >> > to
> >> > play by the rules here but it's not clear what they are.
> >> >
> >> > --
> >> > 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.
>
> --
> 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