Skip to content

Instantly share code, notes, and snippets.

@rastandy
Last active November 22, 2017 11:21
Show Gist options
  • Save rastandy/d29556d3c50262cd958ea9fa1a66fd23 to your computer and use it in GitHub Desktop.
Save rastandy/d29556d3c50262cd958ea9fa1a66fd23 to your computer and use it in GitHub Desktop.
Fulcro client creation
(ns data-portal.client
(:require [om.next :as om]
[fulcro.client.core :as uc]
[data-portal.ui.html5-routing :as routing]
[data-portal.ui.root :as root]
[fulcro.client.logging :as log]
[data-portal.api.core :refer [make-rest-network]]))
(defonce app
(atom (uc/new-fulcro-client
:started-callback (fn [{:keys [reconciler] :as app}]
(let [state (om/app-state reconciler)
root (om/app-root reconciler)
{:keys [ui/locale ui/ready?]} @state]
(routing/start-routing root)))
:networking {:remote (make-rest-network)})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment