These are chat archives for lift/framework

28th
Oct 2015
Kaiyin Zhong
@kindlychung
Oct 28 2015 23:02
    "li .name *" #> users.map {
      user => {
        log(user)
        Text(user)
      }
    }
What does this actually do? I don't understand.
From the lift app dev cookbook
Corey Ricketts
@doncorsean
Oct 28 2015 23:09
What part are you unclear on?
Kaiyin Zhong
@kindlychung
Oct 28 2015 23:10
@doncorsean the #> function
Corey Ricketts
@doncorsean
Oct 28 2015 23:10
It is Css selector bind. It will map each user to the selector on the left
Kaiyin Zhong
@kindlychung
Oct 28 2015 23:11
users map {...} is just converting strings into xml literals, if am correct?
ok
That means the html view will change when users change?
Corey Ricketts
@doncorsean
Oct 28 2015 23:14
This message was deleted
This message was deleted
wont nesessarily update the dom unless you re-render that nodeSeq with an ajax call
Corey Ricketts
@doncorsean
Oct 28 2015 23:24

"div" #> SHtml.idMemoize(
        outer => {

"li .name *" #> users.map {
      user => {
        log(user.name)
        Text(user.name)
      }
    }
}
If you call outer.setHtml() it will re-render that div based on whatever new value for users you have at that time
Corey Ricketts
@doncorsean
Oct 28 2015 23:37
@kindlychung Here’s an interesting post I was reading yesterday http://underscore.io/blog/posts/2015/03/13/rxlift.html