This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-30
Channels
- # announcements (3)
- # aws (5)
- # beginners (71)
- # boot (7)
- # calva (74)
- # cider (6)
- # clj-kondo (2)
- # cljs-dev (5)
- # clojars (6)
- # clojure (84)
- # clojure-dev (7)
- # clojure-europe (1)
- # clojure-italy (23)
- # clojure-nl (43)
- # clojure-sanfrancisco (1)
- # clojure-spec (4)
- # clojure-uk (173)
- # clojurebridge (1)
- # clojurescript (14)
- # cursive (44)
- # datomic (9)
- # duct (2)
- # emacs (2)
- # fulcro (4)
- # graalvm (4)
- # graphql (27)
- # hoplon (6)
- # keechma (50)
- # off-topic (3)
- # other-languages (8)
- # pathom (2)
- # pedestal (14)
- # planck (5)
- # re-frame (3)
- # reitit (6)
- # ring (2)
- # robots (2)
- # spacemacs (9)
- # tools-deps (15)
- # vim (44)
I'm trying to have a minimal keechma app starting but i get this repl/invoke error #error {:message "System must have a :main component!", :data {:type :keechma.ui-component/error}}
looks like i have to add the key-value {:router :memory} or some other to the app definition
which begs the question, what are the difference between hashchange, history and memory routers
hey @carkh easiest way to generate the minimal keechma app is to run lein new keechma name-of-app
this will generate a minimal structure you need to run it
as for the routers:
- hashchange
- binds to hash route (after #
in the URL)
- history
- uses pushState and history API - replaces the whole URL
- memory
- uses in memory atom to store the route data - we use this one mostly in the mobile / react native context
Keechma requires you to register the components in a map that you pass to the app when you start it - this map must have a component registered under the :main
key
thanks @mihaelkonjevic
I would also recommend you to check https://github.com/gothinkster/clojurescript-keechma-realworld-example-app
this app is built in “keechma” way, and you can compare it with other platforms
for instance i had to remove the ui/system call around that map containing the main component
and the app definition had to have a :router key while i didn't see it anywhere in the example applications
ui/system
is called internally on the map passed to the app definition
and I’m pretty sure that the :hashchange
router is default
the one thing I see is that you don’t have a default route defined -> ["" {:status "all"}]
if i remove the router key, the whole page is made blank in the browser, and i need to refresh
also, you’re passing false
to should-mount in app-state/start! call, this means that the app will have to be mounted manually to the dom element
ah, ok
another question : when trying to develop using devcards or workspaces, I need to provide a full application
yeah, you could use it in that case, but keep in mind that your urls will stop working
personally I’m rarely using devcards because I usually like to develop with server in place, so it makes sense to test the whole app (backend and frontend)
I did use them for pure components (that only depend on their args)
I haven’t used EQL so far, so I don’t know 🙂. But, Keechma is built in a very generic way (mostly because we are using it in agency setting where we are not able to always control the backend), so you should be able to write EQL driver for that, the only thing that you need is to implement a loader that knows how to interpret params returned from the datasource’s params fn
We’ve used it successfully with REST, GraphQL, Contentful, Firebase and some other weird API backends, so I believe that EQL should be easy to implement
no problem, please mention me whenever you need help, because otherwise I check this channel once daily 🙂