These are chat archives for jdubray/sam

23rd
Mar 2016
Michael Solovyov
@msolovyov
Mar 23 2016 13:30
Hyperscript might be an even better fit for view functions. https://github.com/ohanhi/hyperscript-helpers
Jean-Jacques Dubray
@jdubray
Mar 23 2016 14:00
I'll take a look at it, looks promising. I'am still looking for a good way to do that without writing the kind of JS functions I currently write.
On another note, I was watching this presentation from Netflix
https://www.youtube.com/watch?v=COviCoUtwx4
SAM supports cancellation in a very very simple way, that's the power of separating proposals (Actions) from acceptance (Model). I am going add it to SAFE this week.
Jean-Jacques Dubray
@jdubray
Mar 23 2016 14:15
I just can't imagine people creating "smart" view component, this is the completely wrong thing to do. In other words every time you feel the urge to add something to the componentDidMount method you are doing something wrong.
Netflix moved away from the "highly observable" model (not surprised)
Jean-Jacques Dubray
@jdubray
Mar 23 2016 14:45
and "no refs ever"
"people are struggling to make react perform on laptops" (let alone TV sets)
For the NetFlix UI, React came down to 60 ms of dead weight (while they needed to render under 100ms)
Jean-Jacques Dubray
@jdubray
Mar 23 2016 14:54
That being said, I can see the same mistake made systematically:
1) getNextState
2) render
everyone using the transducer/reducer model has no room for the S() function.
Jean-Jacques Dubray
@jdubray
Mar 23 2016 15:00
Netflix built simple context specific diff strategies (as opposed to vdom) and they seems very happy with it
weepy
@weepy
Mar 23 2016 15:02
I'd love to see vdom / hypertext eg snabbdom in the Sam examples
React feels wrong to use
Jean-Jacques Dubray
@jdubray
Mar 23 2016 15:06
actually Netflix does not use it, they wrote their own version
there is a snabbdom example
weepy
@weepy
Mar 23 2016 15:21
awesome
i'll have a look
i think when netflix have a very specific, very static and well defined interface, they can afford to make context specific optimizations
plus a big team
Michael Solovyov
@msolovyov
Mar 23 2016 15:34
Netflix UI isn't that great anyhow. Way too much time spent loading.
Jean-Jacques Dubray
@jdubray
Mar 23 2016 15:52
@msolovyov I totally agree, it's very iffy, I thought it was just me, but considering the amount of effort they put behind it...
for me the message though is that you should not be afraid to write your own code over a framework. some of the things they are talking about is minimal
Michael Solovyov
@msolovyov
Mar 23 2016 16:05
The search is the worst. It's UI blocking while it tries to autocomplete as you type.
/input blocking
weepy
@weepy
Mar 23 2016 20:10
JosePedroDias's example is very good