New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with deferencing cursor in tutorial #75

Closed
deaddowney opened this Issue Jan 25, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@deaddowney
Copy link

deaddowney commented Jan 25, 2014

I'm up to the point in the tutorial where I'm supposedly fixing the delete button bug, however I'm experiencing the opposite behavior to what is described, that is, the code works in the first case:

(defn contact-view [contact owner](reify
om/IRenderState
%28render-state [this {:keys [delete]}]
%28dom/li nil
%28dom/span nil %28display-name contact%29%29
%28dom/button #js {:onClick %28fn [e] %28put! delete contact%29%29})))))

and doesn't work when I change contact to @contact.

I get :
Uncaught Error: No protocol method IDeref.-deref defined for type om.core/MapCursor: [object Object] core.cljs:136
missing_protocol core.cljs:136
(anonymous function) core.cljs:279
_deref core.cljs:280
deref core.cljs:7108
om_tut.core.contact_view.om_tut.core.t12182.om$core$IRenderState$render_state$arity$2.React.DOM.li.React.DOM.button.onClick core.cljs:33
SimpleEventPlugin.executeDispatch

@swannodette

This comment has been minimized.

Copy link
Member

swannodette commented Jan 25, 2014

Several people have encountered this issue. Make sure that 0.3.0 is specified in your project.clj and be sure to run lein cljsbuild clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment