New chestnut project: Editing app-state doesn't refresh browser

54 views Asked by At

After getting hyped by Nolen's great talks, I decided to give Clojurescript and Om a go.

Everything works as advertised - except I'm a bit surprised that editing the app-state doesn't refresh the browser like editing style.css or the Om component tree does.

I'm guessing this is intentional and that there's a good reason why editing app-state doesn't refresh the browser. However, I'm very new to ClojureScript and don't quite know where yet to go digging for the answer.

Any help/insight is appreciated!

1

There are 1 answers

0
Kurt Mueller On BEST ANSWER

Of course, 5 minutes after I post this question, I run across the answer.

Taken from Om's Basic Tutorial:

The reason we need to refresh the browser is because app-state is defined with defonce. This is meant to prevent each reload from resetting the state.