gormonn / dna

Frontend best practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DNA, a framework without a framework

These are the best practices of the modern frontend, packed into one simple module.

DNA is a recursive acronym for "DNA's Not Angular"

Usage example:

import {
  nothing,
  html,
  css,
  component,
  useState
} from 'dna'

import styles from './styles.css'

export function MyComponent() {
  const [counter, setCounter] = useState
  return html`
    <style>
      ${styles}
    </style>

    <div>
      <button @click=${ setCounter(counter + 1)}> Count: ${ counter }</button>
    </div>
  `
}

export default component(MyComponent)

About

Frontend best practices

License:MIT License


Languages

Language:JavaScript 97.2%Language:Emacs Lisp 2.8%