Skip to content

Example application build with Reactive HyperText Markup Language (rhtml) https://github.com/rxdi/rhtml

Notifications You must be signed in to change notification settings

r-html/rhtml-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reactive HTML example

import '@rhtml/hooks';
import '@rhtml/components';
import '@rhtml/graphql';
import '@rhtml/operators';

import { Component, LitElement, html } from '@rxdi/lit-html';

@Component({
  selector: 'app-component',
  template(this: AppComponent) {
    return html`
      <r-part>
        <r-settings .value=${{ fetchPolicy: 'cache-first' }}></r-settings>
        <r-fetch query="{ continents { name } }"></r-fetch>
        <r-render .state=${({ data: { continents } }) => html`
          <r-for .of=${continents}>
            <r-let .item=${({ name }) => name}></r-let>
          </r-for>
        `}>
        </r-render>
      </r-part>
    `;
  }
})
export class AppComponent extends LitElement {}

Start

npm start

Build

npm run build

About

Example application build with Reactive HyperText Markup Language (rhtml) https://github.com/rxdi/rhtml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published