(ns example.core
  (:require [com.stuartsierra.component :as component]))

(.info js/console "Prod loaded.")

(defrecord App []
  component/Lifecycle
  (start [component]
    (.info js/console "App started.")
    component)
  (stop [component]
    (.info js/console "App stopped.")
    component))

(defonce system (atom (component/system-map :app (map->App {}))))

(defn start! [window]
  (.info js/console "Starting...")
  (swap! system component/start)
  (.info js.console "Finished starting."))