View Single Post
09-22-16, 08:28 AM   #1
Kagura
A Fallenroot Satyr
Join Date: Nov 2008
Posts: 21
Journey to developing a complete UI in JS

Hello,

I am mainly looking for discussing and critique about the path I am currently walking. Without further ado:

I decided two weeks ago that I wanted to develop a new UI, but I wanted it to be a different journey and I wanted to have fun. I like javascript and I write React applications at work and in my private time and I like the way you 'develop' there. I thought it would be awesome to be able to write my own UI in javascript.

Fast forward to today, I am capable of doing next (Might look weird, but this is basically ES6 + JSX syntax): https://gist.github.com/Nimaear/33cf...0cae3366e54f0a

Which results in:


Now this already looks like things are working, but I am really unhappy with how I translate the render method to a UI. Mainly the nesting of children doesn't really work like I want.

Now my question here and mainly the thing I want to discuss is: How would you define a Component that can host nested Components in lua and what kind of structure would you put this in? My problem here is that I have taken maybe a too close approach to React and need to think out of the box. I have total control over how javascript gets translated to lua and would like some input here.

p.s. I know it sounds a little vague, I appreciate the thoughts.
  Reply With Quote