Skip to content

Instantly share code, notes, and snippets.

View iainjreid's full-sized avatar
👋

Iain J. Reid iainjreid

👋
View GitHub Profile
export const h=(t,m,...c)=>({...m,t,m,c})
export const render=(e,d,t=d.t||(d.t={}),m,r,c)=>
// arrays
[e].flat(1/0).map((e)=>
// components
e.t.call?(e.i=render((render.c=e).t({children:e.c,...e.m},e.s=t.s||{},t=>
render((e.s={...e.s,...t})&&e,d,e)),t.i||d,t?.i||{}),e):(
// create notes
e.d=t.d||(e.t?document.createElement(e.t):new Text(e.m)),
// diff props