These are chat archives for jdubray/sam-examples

14th
Sep 2017
Dennis Davis
@ddavis914
Sep 14 2017 22:38
Hi I'm running the inferno app and I have a couple of questions: does anybody know where I can find out more information on the syntax of the markup language used ie {tag: 'div', children:[{ tag: 'form', events:{onsubmit: () => actions.start({})}} ]...}. I get it is a tokenized version of html, but I am looking for what language this is - I looked at the inferno doc and it does not specifically say what tokens are valid. Second question - the actions.start declaration takes (data , present) parameters but then is called with an object actions.start({}). I thought I'd ask before testing what is actually passed. Thanks alot - btw i'm convinced this is THE way to manage the complexity of multiple actors attempting to modify the model - action - present - accept - model update - view update - very clean with a mathematical proof of correctness to boot - sweet.
view.ready = function(model) {
  return {
    tag: 'div',
    children: [
      view.counter('Counter: '+model.counter),
      {
        tag: 'form',
        events: {
          onsubmit: () => actions.start({})
        },
        children: [
          {
            tag: 'div',
            className: 'form-group',
            children: [
              {
                tag: 'input',
                attrs: {
                  type: 'submit',
                  value: 'Start'
                }
              }
            ]
          }
        ]
      }
    ]
  }
}