Hi Sean,

Your root component app-view is not a component, it's just a DOM
element.  I'm not really sure what that would/should do, but simply
wrapping that in om/component made both problems go away.

I would also suggest simply passing the value of the field to chsk-send!
onKeyPress--you have a layer of indirection in there that I don't think
you need.

https://gist.github.com/ddellacosta/10004125

Cheers--

DD

(2014/04/06 9:03), Sean Corfield wrote:
> I worked through the tutorials and that all works fine. So I decided
> to create a little example with Sente and Om together. It mostly works
> but the Om side has a couple of strange quirks and I cannot for the
> live of me figure out what I'm doing wrong.
> 
> The example code is here:
> 
> https://github.com/seancorfield/om-sente
> 
> Run: lein cljsbuild auto om-sente
> 
> Run: lein run -m om-sente.server
> 
> Browse to: http://localhost:8444
> 
> The quirks:
> 
> * The first keystroke in the input field just disappears and the field
> loses focus. Subsequent keystrokes all work just fine. It's as if the
> first om/set-state! is ignored (or maybe the component is
> re-created?).
> 
> * Pressing enter in the input field sends the value to the server
> which just echoes it back. The echo/reply seems to be functioning
> properly but om/set-state! either doesn't update every time or the
> component doesn't re-render. Every other reply is displayed.
> 
> Any help gratefully received!!
> 

-- 
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