Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upQuestion: how does the change event get triggered? #16
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alessioalex
Apr 6, 2015
The confusing thing to me is that you are not using .set() to update the value, so I'm guessing you are probably using Object.defineProperty() with custom setters somewhere..?
alessioalex
commented
Apr 6, 2015
|
The confusing thing to me is that you are not using |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alessioalex
commented
Apr 6, 2015
|
Ah nevermind: https://github.com/AmpersandJS/ampersand-state/blob/master/ampersand-state.js#L560 My bad |
alessioalex
closed this
Apr 6, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
latentflip
Apr 6, 2015
Contributor
@alessioalex heads up that the future of domthing looks tentative :) it's probably unlikely it'll make a full production-quality release if I'm honest, as combining react + ampersand has probably a stronger future than I can support with domthing. But, feel free to play with it :)
|
@alessioalex heads up that the future of domthing looks tentative :) it's probably unlikely it'll make a full production-quality release if I'm honest, as combining react + ampersand has probably a stronger future than I can support with domthing. But, feel free to play with it :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alessioalex
Apr 7, 2015
To be honest I'm not too fond of React. I dislike JSX and writing all my template code in JavaScript. domthing might not be React, but it's simple and gets the job done.
I think the only thing I would change is making it render stuff with setImmediate or something, in case there are other changes in the same event loop tick: https://github.com/AmpersandJS/ampersand-domthing-mixin/blob/master/index.js#L8-L14
TL;DR Love the simplicity of Ampersand with this module, dislike React inliny templates.
@latentflip btw, are there any Ampersand with React examples? Would like to replicate an example with domthing.
alessioalex
commented
Apr 7, 2015
|
To be honest I'm not too fond of React. I dislike JSX and writing all my template code in JavaScript. I think the only thing I would change is making it render stuff with TL;DR Love the simplicity of Ampersand with this module, dislike React @latentflip btw, are there any Ampersand with React examples? Would like to replicate an example with |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
latentflip
Apr 7, 2015
Contributor
@alessioalex this already happens, it just happens within domthing. Renders are queued until the next requestAnimationFrame fires: https://github.com/latentflip/domthing/blob/master/lib/runtime/template.js#L35-L38
|
@alessioalex this already happens, it just happens within domthing. Renders are queued until the next requestAnimationFrame fires: https://github.com/latentflip/domthing/blob/master/lib/runtime/template.js#L35-L38 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
alessioalex
Apr 7, 2015
@latentflip thank you for your prompt feedback, really appreciate it. Well I guess this module is just perfect for some use cases then :D I'll go along and play with it :)
alessioalex
commented
Apr 7, 2015
|
@latentflip thank you for your prompt feedback, really appreciate it. Well I guess this module is just perfect for some use cases then :D I'll go along and play with it :) |
alessioalex commentedApr 6, 2015
Hey @latentflip I was just wondering how does the change event get triggered for the domthing example? I'm having a hard time understanding this. I've looked at
ampersand-statebut I'm either too tired or the change is not being triggered there. Thank you./cc @HenrikJoreteg
Thanks guys.