Skip to content

defonce would preserve app state after hot reloads #366

Open
@qrthey

Description

@qrthey

(def click-count (r/atom 0))

In clojurescript the state ratom would typically be defined with defonce instead of with def. Doing so would ensure that the state of the application is kept when new changes are saved (be it in cljs files or stylesheets).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions