Add Cursor To Local State

Add Cursor to Local state so it can be modified

Reveal answer...
    om/IInitState
    (init-state [this]
      {:title (:title cursor)
       :description (get cursor :description "")
       :speaker-name (get cursor :speaker-name "")
       :speaker-biography (get cursor :speaker-biography "")
       :twitter-handle (get cursor :twitter-handle "")
       :github-handle (get cursor :github-handle "")
       :speaker-website (get cursor :speakers-website "")}

Hint

The get function can return a default value if no value for an element is found in the collection the get function is applied to.

results matching ""

    No results matching ""