2.0.0 • Published 4 years ago

@opennetwork/conventions v2.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Conventions

UI

All visual state will be represented as jsx, this allows flexibility around the target runtime

export const Hello = <>
  <title>Hello!</title>
  <header>Hello!</header>
</>

UI Components can be defined using a function, this allows information to be serialized into a visual representation

export interface Article {
   content: unknown
   title: unknown
}

export function DisplayArticle(this: Article) {
  return <>
    <title>{this.title}</title>
    <article>
      <header>{this.title}</header>
      {this.content}
    </article>
  </>
}