om-next

2016-12-19T21:31:03.000042Z

@ghaskins I’d use/wrap react-bootstrap, which can be found on cljsjs (lein dep: [cljsjs/react-bootstrap “0.30.6-0”] )

ghaskins 2016-12-19T21:32:17.000043Z

@solussd ty, so far having decent luck with [cljs-react-material-ui "0.2.33"]

2016-12-19T21:33:33.000044Z

I’ve used that, too. 🙂

ghaskins 2016-12-19T21:34:20.000045Z

oh, cool..any thoughts on how it compares to react-bootstrap in terms of integration ease (obviously, the aethetics of the ui would be different)

ghaskins 2016-12-19T21:35:22.000046Z

so far, i've been happy though my impression so far is material-ui is more about the components/aethetics than it is about the full responsive framework like bootstrap

ghaskins 2016-12-19T21:35:49.000047Z

so, ive been augmenting the material ui components with flexbox

2016-12-19T21:36:07.000048Z

I really liked it. I don’t think there is a compelling reason to prefer bootstrap over it

ghaskins 2016-12-19T21:36:14.000049Z

ok

2016-12-19T21:36:16.000050Z

I haven’t used it w/ flexbox, but that sounds great

ghaskins 2016-12-19T21:36:20.000051Z

good to know

2016-12-19T21:36:24.000052Z

flexbox is pretty new to me

ghaskins 2016-12-19T21:36:29.000053Z

me too 😉

ghaskins 2016-12-19T21:36:49.000054Z

i only discovered it because the material-ui example used it and I realized there wasnt a grid baked in

2016-12-19T21:37:50.000055Z

I’m looking forward to using it in a mobile app (react-native)

ghaskins 2016-12-19T21:38:11.000056Z

cool...ill be sure to update my progress here

ghaskins 2016-12-19T21:38:22.000057Z

its going to be a FOSS project I am doing for a PTA

ghaskins 2016-12-19T21:38:53.000058Z

https://github.com/mayopta/library-asset-tag

ghaskins 2016-12-19T21:39:10.000060Z

still WIP

ghaskins 2016-12-19T21:40:09.000061Z

Im currently using flexbox on the "home" view (https://github.com/mayopta/library-asset-tag/blob/master/src/cljs/library_asset_tag/ui/home.cljs)

2016-12-19T21:40:59.000063Z

cool

ghaskins 2016-12-19T21:43:16.000064Z

on a completely different subject, struggling to get the right combo of quote/unquote to invoke om/transact! from a different namespace than the reconciler

ghaskins 2016-12-19T21:43:23.000065Z

any best practices or examples out there?

ghaskins 2016-12-19T21:44:10.000066Z

e.g. (om/transact! core/reconciler `[(foo {:param ~param})])

ghaskins 2016-12-19T21:44:52.000067Z

i need to unquote param so its value is substituted, but leave "foo" undecorated so it matches the method dispatch in the core ns

ghaskins 2016-12-19T21:45:04.000068Z

i feel like I am poking in the dark, heh

ghaskins 2016-12-19T21:45:13.000069Z

so there must be something I am just missing

ghaskins 2016-12-19T21:56:39.000070Z

nm, i figured it out

samcf 2016-12-19T22:00:21.000071Z

@ghaskins would be interesting to see what you did there for my own edification

ghaskins 2016-12-19T22:00:48.000072Z

ill push my latest, easier to point to it

ghaskins 2016-12-19T22:01:42.000075Z

easiest to describe like this

ghaskins 2016-12-19T22:02:16.000076Z

originally I had L25 as (defmethod mutate 'add-session-asset

ghaskins 2016-12-19T22:02:29.000077Z

and L39, similar name

ghaskins 2016-12-19T22:02:59.000078Z

but the problem is, with the quote/unquote syntax, that expanded to "library-asset-tag.ui.core/add-session-asset"

ghaskins 2016-12-19T22:03:16.000079Z

then I noticed that all the om-next examples used a different ns

ghaskins 2016-12-19T22:04:00.000082Z

like 'points/increment

ghaskins 2016-12-19T22:04:04.000083Z

that was the hint I needed

ghaskins 2016-12-19T22:04:41.000084Z

basically, stupid pseudo newbie error on my part, but im drinking through the firehose

2016-12-19T22:04:56.000085Z

@ghaskins I would make a habit of using namespace-qualified symbols for mutation names

ghaskins 2016-12-19T22:05:10.000086Z

@solussd yeah, I can see that makes sense

2016-12-19T22:05:17.000087Z

if you ns-qualify things using a syntax quote, clojure won’t qualify them automatically.

ghaskins 2016-12-19T22:05:21.000088Z

i didnt pick up on that reading the om-next wiki the first time through

2016-12-19T22:05:47.000089Z

e.g., `[(app/blah {:thing ~value})]

👍 1
2016-12-19T22:06:14.000090Z

:thumbsup:

2016-12-19T22:07:53.000091Z

hah, I just read the backlog here. I guess you had it all figured out before I commented

ghaskins 2016-12-19T22:08:42.000093Z

no worries, I appreciate any pointers

ghaskins 2016-12-19T22:08:53.000094Z

this framework is awesome, btw

ghaskins 2016-12-19T22:08:57.000095Z

kudos to the devs

2016-12-19T22:09:20.000096Z

🙂 I like it, but it does have a bit of a learning curve

ghaskins 2016-12-19T22:09:55.000097Z

yeah, though they all do to some respect..id much rather invest in one that lets me code sanely in clojure(script)

ghaskins 2016-12-19T22:11:13.000098Z

do you have any advice for the way to mutate a vector, like here: https://github.com/mayopta/library-asset-tag/blob/08b33f007cafe6fd0dd9f414055cd6b908887f99/src/cljs/library_asset_tag/ui/core.cljs#L30

ghaskins 2016-12-19T22:11:41.000100Z

I basically want to conj something to the :session-assets, im not quite clear on the (swap!) form

ghaskins 2016-12-19T22:12:08.000101Z

i know this is pure clojure, not om specific, but maybe someone has their head wrapped around it

2016-12-19T22:12:20.000102Z

I’ve found that it scales well w.r.t. adding features. UI, parsers, remote querying, and mutations aren’t conflated in the ways they are in other frameworks

ghaskins 2016-12-19T22:12:30.000103Z

that is my impression as well

ghaskins 2016-12-19T22:12:52.000104Z

i took on this simple project to learn the ins-and-outs without getting bogged down in a complicated design

2016-12-19T22:14:26.000105Z

I’d just do: (swap! state update-in [:some :key :path] conj thing-to-add)

ghaskins 2016-12-19T22:14:47.000106Z

cool, i saw update-in in the examples for something similar, i figured it was related

ghaskins 2016-12-19T22:14:49.000107Z

let me try that

2016-12-19T22:15:40.000108Z

swap! will pass the current value of the state atom as the first arg to update-in and update-in will pass the value at the given keypath as the first arg to conj

2016-12-19T22:17:15.000109Z

goodluck- I’m out for the evening