untangled

NEW CHANNEL: #fulcro
fragamus 2016-12-16T20:40:37.000511Z

can anyone help me get this switcher thing to work

tony.kay 2016-12-16T21:08:40.000515Z

@fragamus Line 12

tony.kay 2016-12-16T21:08:48.000516Z

[:tab :main-tab]?

tony.kay 2016-12-16T21:09:19.000517Z

and I think you've got the order switched, actually

tony.kay 2016-12-16T21:09:33.000518Z

If I remember right, the "type" has to be the first element of the ident, not the second

tony.kay 2016-12-16T21:10:50.000519Z

Think of the to-many union case: you might have a list of idents like this: [ [:image 1] [:comment 2] [:link 3] ] to render out a list of things (an image, comment, and link). The union query would be {:image (om/get-query Image) :comment ...}

tony.kay 2016-12-16T21:11:14.000520Z

The first element of the ident is used to select the subquery to use for the element being found in the app db

tony.kay 2016-12-16T21:11:19.000521Z

same rule for singletons

tony.kay 2016-12-16T21:11:45.000522Z

It sucks a little for singletons, cause you'd like to say [:tab :main], but you have to instead say [:main :tab]

tony.kay 2016-12-16T21:12:37.000523Z

might also help to remember that the second element of a thing is the ID, and there is only one of those for singletons...what if it were a number (which it can be): [:main 0], [:main :only-one], etc.

fragamus 2016-12-16T21:42:48.000524Z

wow thanks Tony I'll try it out.

keatondunsford 2016-12-16T23:11:07.000528Z

Maybe a dumb question — is Om unusable/not worth it without a Clojure/Datomic/EDN backend?

keatondunsford 2016-12-16T23:12:27.000529Z

Clojure and Datomic aren’t technically possible backend options in our case with my team’s project.

keatondunsford 2016-12-16T23:12:54.000530Z

EDN might be if we can get our backend parser to support it.

tony.kay 2016-12-16T23:18:59.000531Z

we're using SQL on the back-end, and have used Datomic too

1👍
tony.kay 2016-12-16T23:19:05.000532Z

see this:

tony.kay 2016-12-16T23:19:21.000533Z

https://github.com/awkay/table-to-tree

tony.kay 2016-12-16T23:19:29.000535Z

It has a devcard...run the cards build and read the card