This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-15
Channels
- # admin-announcements (25)
- # beginners (21)
- # boot (487)
- # cider (8)
- # clara (2)
- # cljsrn (35)
- # clojure (44)
- # clojure-austin (6)
- # clojure-russia (211)
- # clojure-uk (25)
- # clojurescript (225)
- # core-matrix (1)
- # data-science (3)
- # datomic (23)
- # events (1)
- # hoplon (9)
- # immutant (14)
- # jobs (1)
- # jobs-discuss (5)
- # ldnclj (3)
- # lein-figwheel (2)
- # off-topic (2)
- # om (65)
- # onyx (65)
- # parinfer (3)
- # pedestal (4)
- # proton (1)
- # protorepl (1)
- # re-frame (16)
- # reagent (3)
- # ring-swagger (1)
- # specter (11)
- # untangled (1)
- # yada (8)
@anmonteiro: 1) yes
@dnolen: perfect, thanks
still not sure how to approach the ident stuff on the server-side, though
but I'll have concrete questions when I dive into it
@matthavener: right, I found that a little while ago, I’m going through them to see if I’ve introduced an error somehow...
What is the current status of server side rendering for Om Next? I'd like to build a system similar to using Gatsby (React static site generator) and Netlify.
common_creative: I think someone asked a few days ago in here, don't think they got much of an answer
does om.now have server side rendering?
(seems it does, super cool https://github.com/Sparrho/supper-demo)
@matthavener: I'm aware of this however not sure how much work has been done on it which is why I was wondering about its status https://github.com/omcljs/om/wiki/Server-Side-Rendering That one you shared looks good. I'm weighing up whether using Amazon Lambda Serverless architecture or some kind of Elixir/Pheonix solution would be best.
@grounded_sage: I use a boot task to run clj-webdriver with phantomjs and have it browse each route of the site and save it to a static HTML. Each page includes the app state for that page in a <script id="state" type="application/edn">...</script>
tag which is loaded by the app.js before starting the reconciler. This enables us to pregenerate all of our pages ahead of time and they load fast with all of the React tags long before the app.js loads and Om runs.
Im getting weird bug, Im trying to do om/transact! with a backtick like this #(om/transact! reconciler [(router-get-page! {:html-contents `~(.getResponseText (.-target %))})]) and as you can see it needs to be a backtick so I can get the contents of the http response. But I get an error sayng that mynamespace/router-get-page! does not exist, but it I transact this in the repl on remove the namespace from the router-get-page! method, everything works fine.
ps. slack will start doing markdownish styling when I insert the backtick, but I can assume that you know there it is standing.
@hlolli: I'd just thow away the backtick altogether and use (list 'router-get-page! ...)
no unquote needed.
@thosmos: that's a creative solution. Not quite the one I am looking for but from what you have said it's pretty much the result I am looking for. I'm still getting my programming chops so looking for more simple/easy solutions. May just stick with building my sites with Stasis and drop Om in as and when needed
so I 'm getting this error whenever I do a particular mutation.
Uncaught #error {:message "No queries exist for component path (komokio.core/Root komokio.core/ColorsEditor komokio.core/Color)", :data {:type :om.next/no-queries}}
This error started happening when I added some stateless UI components between the root and the component thats calling the mutate so it has to do with that, but I'm not sure why. I'm composing the queries from root and the app renders correctly. Any ideas?seanirby: are you calling transact! on a component with no query? that could be it..
matthavener: I wouldn't expect that error since everything renders correctly. Could it be something in the mutate function?
@seanirby: everything rendering correctly doesn't mean that you got queries right
If you paste the queries of those 3 components here I'm happy to have a look
In my experience it has been when I called transact on a component with no query or when an ident was messed up. You might be able to look at the stack and see what's going on inside of om too
I think i've found the problem, i'm using an ident to reference the data im mutating, when I remove that reference the error stops. Not sure why but I'll put a paste together
The stack will show full-query
, default-ui->props
and reconcile!
which won't be much of help
anmonteiro: http://pastebin.com/0jrFxxkb
anmonteiro: OK I see whats the problem is with the queries for FacesEditor and ColorsEditor. Those should be stateless
@seanirby: right
with the approach you pasted, the root never knows about the query in ColorsEditor..
you can also provide a vector of keys to be re-read just like in transact!
(om/set-query! this {:query [:some/key]} [:read/other :yet/another])
Cool! thanks. Seems like there is some problem with my read function. I have trying pathopt=true to see how it works.
@dnolen: I was looking at react-set-state!
and I wonder if the nil
on this line should be cb
https://github.com/omcljs/om/blob/master/src/main/om/next.cljs#L579
@urbanslug: Are you using om.next or om.now ?
Easy way would be to use any jquery upload plugin. Do the initialization in componentDidMount. This would work with om.now.
I am not sure if transit library allows uploads but if it does then you would have to call mutation for uploading a file, otherwise you will have to fallback to conventional upload.
@anmonteiro: oops, yeah
@dnolen: gotcha, I'll get to it later today if you haven't first
@anmonteiro: fixed
Hi everyone, I'm happy to announce that all of the source for our open source Om Next-Based web framework is up on Github, and in reasonably stable condition There is a full-stack implementation of TodoMVC (with list persistence in Datomic), the beginnings of a Om Next style tutorial, i18n, behavior specification support, and much more. I'll be working on a website, documentation, and video tutorials in the coming months. If anyone is attending Clojure West I've also suggested an Unsession for it, so be sure to express your interest there.
See:
https://github.com/untangled-web/untangled-todomvc
https://github.com/untangled-web/untangled
@tony.kay: For the untangled tutorial, I think you'll have to comment out the references to the checkout directories in the project.clj, and change the untangled-client from snapshot to the actual 0.4.5 release.
@taylor.sando: pushed an update on master. If you're playing let me know if that works. I put 0.4.7-SNAPSHOT on clojars
The tutorial is mostly documentation...I'd combine reading that with the TodoMVC app.
The update works
Can someone point me to some guides on how to implement inter-component communication in Om Next? Do I have to use core.async as in "classic" Om , or am I missing something?
@whythat: what exactly do you want to do between components?
have you read this wiki entry? https://github.com/omcljs/om/wiki/Thinking-With-Links%21