These are chat archives for skatejs/skatejs

29th
Sep 2016
Trey Shugart
@treshugart
Sep 29 2016 02:23
@andreawyss I think @bradleyayers is working on what you're looking for. I really think your use case is something we should be solving in Skate. There's no reason for someone to have to write the same lib in TypeScript or Flow. Same goes for generating React components; we should be able to do this at the react-integration level.
Bradley Ayers
@bradleyayers
Sep 29 2016 02:50
@andreawyss i’m definitely interested in any TypeScript compliant API ideas you have to deal with JSX
i think we can make it work today if you don’t care about DRY
but… i care about DRY
SM
@SMEmp
Sep 29 2016 04:30
I'm looking at skate and figured I'd try implementing the TodoMVC example. It looks to be out of date though, I've now copied the entire structure and my render methods seem to be called, but I get nothing in the DOM.
https://github.com/skatejs/todomvc/blob/skatejs/examples/skatejs/js/todo-app.js#L152 skate() seems to now be skate.define(), is that correct?
Bradley Ayers
@bradleyayers
Sep 29 2016 04:31
yes
SM
@SMEmp
Sep 29 2016 04:32
But https://github.com/skatejs/todomvc/blob/skatejs/examples/skatejs/js/todo-app.js#L152 skate.render.html() doesn't seem to have a replacement? skate.h() appears to be for JSX output.
Bradley Ayers
@bradleyayers
Sep 29 2016 04:33
skate.h() isn’t just for JSX, you can use it as-is
it’s a hyperscript API
SM
@SMEmp
Sep 29 2016 04:37
But it does mean I can't just write a template literal chunk of HTML? Because that's what drew me from Polymerland
Bradley Ayers
@bradleyayers
Sep 29 2016 04:37
you can just do elem.innerHTML = ‘<p>hi</p>'
SM
@SMEmp
Sep 29 2016 04:39
There's no diffing based on what I returned that that would mess with? Just property changes triggering re-renders?
Bradley Ayers
@bradleyayers
Sep 29 2016 04:40
prop changes trigger render, and you can do whatever you want in there
if you use skate.h() it’ll mutate the shadow dom, rather than blowing it away completely
SM
@SMEmp
Sep 29 2016 04:41
Ah
Bradley Ayers
@bradleyayers
Sep 29 2016 04:41
it’s backed by Incremental DOM
Trey Shugart
@treshugart
Sep 29 2016 05:37
@SMEmp the todomvc is waaaay out of date. My OS time has diminished a little and will be looking to spend some time soon to get it (and the website) running again.
But please, don’t be afraid to ask questions and raise issues if you need help or have feedback. We’re super responsive :)
or at least strive to be