Fork me on GitHub
#om
<
2016-08-05
>
hlolli13:08:04

a basic cljsjs/react question. What is the right form of this.setState({count: this.state.count + 1}) my attempt is

(fn []
(this-as this
(.-setState this {:count (inc (:count (.-state this)))})))
but its not right format.

anmonteiro13:08:31

@hlolli: it should be (.setState)

anmonteiro13:08:41

but you can use om.next/react-set-state

hlolli13:08:19

hmm ok, I read that source code, thanks!

hlolli17:08:51

I made an om-next template for myself, may be useful for other newbies alike. https://github.com/hlolli/om-next-template

anmonteiro18:08:47

People who are using Compassus, I’d love some feedback on this: https://github.com/compassus/compassus/issues/6