Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 287 Bytes

static.md

File metadata and controls

10 lines (8 loc) · 287 Bytes

Static component

A static component in Vomit is a term used to describe functions that take some data as input and return a DOM element.

function greeting(name) {
  return vomit`<h1>Hello ${name}</h1>`
}

A static component will always return a new DOM element when called.