These are chat archives for jdubray/sam

1st
Oct 2017
Jean-Jacques Dubray
@jdubray
Oct 01 2017 09:51
A react-like functional HTML library in 20 lines of JavaScript
///////////////////////////////////////////////////////////////////////////
// A React Like Functional HTML Library that supports stateless and stateful 
// components as well as component composition
//
let _render = function (mountNode) { 
  return function( stateRepresentation ) {
    (document.getElementById(mountNode) || {}).innerHTML = stateRepresentation
  }
}

let render = function (component, initState, mountNode) {
  let r = _render( mountNode ) 
  initState.render = r
  let stateRepresentation = component(initState)
  r((typeof stateRepresentation === 'function' ) ? stateRepresentation() : stateRepresentation)
}

let intent = function(i, f) {
    window[i] = f
}

let value = function(el) {
  return document.getElementById(el).value
}
///////////////////////////////////////////////////////////////////////////
Here are the react samples implemented with it
Jean-Jacques Dubray
@jdubray
Oct 01 2017 15:10
I truly feel we are there, I expect 2018 will see a No Front-End Framework movement grow.
https://medium.com/@metapgmr/hex-a-no-framework-approach-to-building-modern-web-apps-e43f74190b9c
Victor Noël
@victornoel
Oct 01 2017 15:27
@jdubray I'm pretty sure sentences like "especially considering when the programming model behind Redux and MobX is flawed." are not needed to make your point and risks only make people stop reading because you don't even explain these "facts" :) (note that I understand what you mean by that, but at least link to a previous article you wrote on that matter then).
Jean-Jacques Dubray
@jdubray
Oct 01 2017 15:31
ok, I replaced it by "not optimal"
@victornoel thank you
Victor Noël
@victornoel
Oct 01 2017 15:32
;) no problem, I do hope there is more interests into SAM and the questions it raises!
and so... what is the X for in HEX? :D
Jean-Jacques Dubray
@jdubray
Oct 01 2017 16:20
HECS -> HEX (S is for SAM)
Victor Noël
@victornoel
Oct 01 2017 16:38
ha ^^ lol ok :)