Skip to content

Instantly share code, notes, and snippets.

@bcomnes
Created May 16, 2016 18:02
Show Gist options
  • Save bcomnes/2ffc4a7d3c6afb3e51103906bafac022 to your computer and use it in GitHub Desktop.
Save bcomnes/2ffc4a7d3c6afb3e51103906bafac022 to your computer and use it in GitHub Desktop.
10:53 <bret> i like how react/redux works. i don't like the tool chain very much
10:54 <bret> its a good place to start to understand how view systems that take the always re-render strategy like react does
10:54 <bret> there are alternatives that are less documented but more minimal: https://github.com/Raynos/mercury
10:55 <substack> yo-yo or virtual-dom+main-loop are pretty nice alternatives that give you the basic architecture without the toolchain complexity
10:55 <substack> or bloat
10:55 <bret> https://github.com/shama/bel yeah yo yo too
10:55 <minskmaz> yeah my biggest complaint compes from from simple abstractions becoming huge apis
10:56 <substack> minskmaz: yo-yo/bel and virtual-dom/main-loop are basically finished except for bug fixes and extremely minor feature additions
10:56 <minskmaz> substack: I’ll check it out - how is it for 2 way binding ?
10:57 <substack> instead of 2-way binding, I use an event emitter to trigger state transitions
10:58 <substack> something like: onkeydown: function (ev) { emit('whatever', this.value) }
10:58 <substack> then somewhere else you can map those events onto the state transitions:
10:58 <minskmaz> yeah I substack: I was using radio.js for that
10:58 <minskmaz> and registering watch.js on attributes
10:58 <substack> bus.on('whatever', function (value) { state.whatever = value; update() })
10:59 <minskmaz> substack: are tagged template strings faster than native dom ?
11:00 <substack> faster at what?
11:00 <minskmaz> vanilla dom manipulation
11:00 <bret> oh yeah someone did a virtual dom that used real dom objects
11:00 <bret> what was that called again?
11:00 <substack> morphdom
11:00 <substack> it's what bel/yo-yo use
11:00 <bret> oh yeah rad
11:01 <substack> minskmaz: I'm not sure how to answer that, i think there are many dimensions to the problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment