These are chat archives for anthonyshort/deku

3rd
Jun 2015
Anthony Short
@anthonyshort
Jun 03 2015 15:53
I’ll have a look at this today. I think it’s just not creating the svg element using the correct namespace.
Paul
@dagda1
Jun 03 2015 16:49
what is the main use case to rendering from the server? Performance?
Anthony Short
@anthonyshort
Jun 03 2015 16:51
Yeah pretty much. Just a user experience thing. It means you could render a static site on the server and then run it like a single page app without worrying about SEO and all that
We don't do it for our app yet, but we will eventually. Plus it'll let us use the same components in the app and across all of our other static sites, like the blog and marketing site.
Paul
@dagda1
Jun 03 2015 16:52
makes sense, thanks
love the project BTW, I've been on an ember contract for the last 2 years and I hope to never use ember again
this is a much nicer model.
Paul
@dagda1
Jun 03 2015 19:57
I can't add a click handler to a component like this <AutocompletItem onClick={clickHandler}/>, it must be added to a DOM element?
Lance Pollard
@lancejpollard
Jun 03 2015 20:01
@dagda1 yeah it must be a dom element
for custom components, they start with no properties, so if you wanted you could add onClick as an api to it, and pass down the property to some nested dom element
not sure if it should work like this tho, does react allow you to do that?
Paul
@dagda1
Jun 03 2015 20:03
@lancejpollard I don't know react that well, I think you pass handlers down or you use flux to dispatch all actions up
Anthony Short
@anthonyshort
Jun 03 2015 20:03
Nope react doesn't allow it
Paul
@dagda1
Jun 03 2015 20:05
I think you would probably use bind for partial application and pass the handler in the props
Anthony Short
@anthonyshort
Jun 03 2015 20:09
You can think of elements as special
prefedined components that have props to add events
Paul
@dagda1
Jun 03 2015 20:14
I read in a blog post that flux did not seem to be necessary, where should we be handling mutation and side effects?
Lance Pollard
@lancejpollard
Jun 03 2015 20:18
Flux isn't necessary, but we do something sorta similar to it by convention. Using the idea of a "store", it's where all actions on the data occur.
Paul
@dagda1
Jun 03 2015 20:19
@lancejpollard do you have an example anywhere? How are actions routed there?
Lance Pollard
@lancejpollard
Jun 03 2015 20:19
there is another example higher up too showing other "ui side-effects" like popups
Paul
@dagda1
Jun 03 2015 20:20
@lancejpollard great, thanks
Lance Pollard
@lancejpollard
Jun 03 2015 20:20
np