News for hackers. Stuff that matters.
Re:JavaScript for People Who Hate JavaScript by deckiedan on Wednesday August 09, 2017 @06:55AM (#14967343)
> Writing the react-bindings took me an hour,...

Do you mean generic 'use react in kotlin' bindings? If so, have you published them or would you consider doing so?

Re:JavaScript for People Who Hate JavaScript by cel1ne on Wednesday August 09, 2017 @07:08AM (#14967410)
Yes.

I have not published them, because

a) they use the same method names like the `kotlin-html` package ("div{}" et. al.), only they create ReactElement instead of manipulating the dom. This could be confusing.

b) The type-safe scoping mechanism, so that each scope has it's correct prop-setters and won't inherit setters from a scope further up is rather complex. It uses extension methods with multiple receivers plus operator overrides for `invoke()`.

That is rather complicated to follow so I want to try it out for some time to check if there's confusion or subtle bugs.

c) I haven't optimised for (allocation-)performance yet.

d) I'm using an early-access version of kotlin 1.1.4 which isn't out yet.

Re:JavaScript for People Who Hate JavaScript by boubiyeah on Wednesday August 09, 2017 @07:10AM (#14967420)
If it only took an hour, it can't be very type-safe / comprehensive.
Re:JavaScript for People Who Hate JavaScript by cel1ne on Wednesday August 09, 2017 @07:19AM (#14967471)
Here is a good tutorial if you'd like to try it yourself:

https://kotlinlang.org/docs/reference/type-safe-builders.htm...