Fork me on GitHub
#rum
<
2017-05-11
>
grounded_sage02:05:59

I'm curious. What would it take to server side render Rum with Lumo?

grounded_sage04:05:06

I'm thinking about this for a number of reasons. Netlify has shit support for Boot. I would love to be able to edit my code on any device. I think it would be cool to pull in a repo from Github and edit within the browser with a live environment and then push back to Github. It would open up Rum to a lot more people.

martinklepsch05:05:00

@grounded_sage maybe it would be simpler to just use CI to build things with boot and upload to Netlify then? 😄

grounded_sage05:05:27

Yea I'm back and forth between just doing my own thing and utilising your work with Confetti. @martinklepsch

grounded_sage05:05:52

I really like the integration with GitHub, that it can take other external webhooks, the script injection, compression, the branches being made on an alternate URL for previews, having unique URL's for all deploys so you can look at an old deploy.

grounded_sage05:05:47

They apparently also do some tricky stuff with the CDN. The pricing model doesn't quite work for me. The base $9 only really gets me the proxy rules (will barely use) and form handling (likely roll my own).

martinklepsch05:05:10

@grounded_sage still meaning to dive into some “immutable deploy” kind of stuff for this S3/CloudFront setup but didn’t get to that yet

martinklepsch05:05:13

Think it might be possible with some Cloudfront rules but not sure yet

grounded_sage05:05:39

Taking this to PM to keep Rum clean

kurt-o-sys09:05:08

I'm using rum in a react native (re-natal) app. I'm trying to make https://github.com/facebook/react-native/blob/master/Libraries/Lists/FlatList.js work. Rendering the list is not a problem, but I want to let it scroll on mounting. It seems the method scrollToEnd is invoked, but the list doesn't scroll down:

(defcs testlist < navigation
  {:did-mount (fn[state]
                (let [flatlist (-> state
                                   :rum/react-component
                                   .-refs
                                   (js->clj :keywordize-keys true)
                                   :ref-list)]
                  (.scrollToEnd flatlist) ;; no error here, but it doesn't scroll to the end...
                  state))}
  [{navigation :some.ns/nav
    :as state}]
  (flatlist {:data all
             :keyExtractor (fn [item idx] (str "list-item::" idx))
             :ref :ref-list
             :renderItem #(list-item %)})

kurt-o-sys09:05:49

Adding (-> state :rum/react-component rum/request-render)) (after the .scrollToEnd-call) doesn't help either.

grounded_sage17:05:15

Does anyone know how to prevent flickering? I have a page server side rendered and I've now deferred my JS to keep Google page speed happy. Now what happens is my page loads and then it flickers when the js lands.

misha18:05:26

should-component-update = false opieop

grounded_sage18:05:41

So I just add the static mixin?

grounded_sage18:05:26

Can someone clarify what is meant by the mutable reference? Note that this is not enabled by default because a) comparisons can be expensive, and b) things will go wrong if you pass a mutable reference as an argument. https://github.com/tonsky/rum#optimizing-with-shouldcomponentupdate

grounded_sage18:05:38

It only means at that singular component level right? And I'm guessing it is referring to JS interop stuff or is a mutable reference also an atom?

sebastjan.pereyro18:05:40

reference to js object

grounded_sage18:05:51

Cool. Thanks for the clarification!

kurt-o-sys19:05:39

Hey all, I'm trying to reproduce https://gist.github.com/conrad-vanl/41e2abb244d0b6e1bd952bd4ff4b3cd7 with rum/re-natal. I can't wrap my head around how to make these things work: 1. Something like ref={(ref) => { this.list = ref; }} in the properties. It should look like {:ref #(aset ?? %)}, but how to access this right there? (https://gist.github.com/conrad-vanl/41e2abb244d0b6e1bd952bd4ff4b3cd7#file-app-js-L35) 2. I can make it work if I provide a string or keyword to the ref {:ref :list}, although it's not recommended to do so. However, even if I do this, in a did-mount-mixin, I don't seem to be able to execute functions on this. For example (.scrollToEnd (-> state :rum/react-component .-refs (aget "list")))should scroll to the end of the list. (https://gist.github.com/conrad-vanl/41e2abb244d0b6e1bd952bd4ff4b3cd7#file-app-js-L23) It doesn't. No errors, but it just doesn't scroll to the end of the list (using RN FlatList). How can I make these things work in rum/re-natal?