noveogroup-amorgunov / hyperapp-starter

Hyperapp starter with JSX, TypeScript and Parcel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hyperapp-starter

Hyperapp starter with TypeScript, JSX and Parcel.

export const View = () => (state: AppState) => {
    return (
        <main>
            <Counter id="__foo__" />
            <Counter id="__bar__" />
            <br />
            <pre>
                <code>{JSON.stringify(state, null, '  ')}</code>
            </pre>
        </main>
    );
};

app<AppState>({
    init: getInitialState<AppState>({}),
    view: stateProvider<AppState>(View),
    subscriptions: state => [persist(state)],
    node: document.querySelector('#app')!,
});

Features

  • Using TypeScript
  • Extending library h function to use JSX
  • Bundling with Parcel
  • Modular system (stateful components)
  • Sync store with localStorage
  • Provide store to child components

Installation

npm i
npm start

About

Hyperapp starter with JSX, TypeScript and Parcel

License:MIT License


Languages

Language:TypeScript 93.9%Language:HTML 5.2%Language:JavaScript 0.9%