Fork me on GitHub

Hiya there! I haven’t found documentation for make-reaction optional parameters auto-run on-set and on-dispose, could you elaborate on them or tell me where I could find so? Thanks in advance!


@metametadata so how do I go about creating a local state for the component so that I could do what I am trying to do now?


I have tried to to make an anonymous function in the component but then it doesn't even render the component whatever is inside the anonymous function.


@artur you were on a right path - you need a Form-2 component to store the local state in it:


If I have a link on my page that triggers a function, is there a way to force browse to go to top of the page?



(defn- scroll-to-top []
  (.scroll js/window 0 0))


What might be correct way to serve reagent app on index.html with routing? Currently I am having this problem where main page has an intro text and a link that directs to /room and this is catched by reagent app. But when I enter the url directly on the browser with /room it gives me 404.