0.0.1 • Published 4 years ago

regista v0.0.1

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

This is a POC only, and a work in progress. Not meant for production

Install

Simply npm i regista and you're good to go.

Quick example

First thing you need to do is create a store that holds the app state and the logic to update it.

import { Store } from 'regista';

export default class AppStore extends Store {
    state = {};
}

Next we need to register our store

import { register } from 'regista';
import Store from './Store';

const AppStore = new Store({/* default state */});

register(AppStore);

Finally, let's add some HTML

<label>Your name:</label>
<input type="text" data-key="name">
<p>Hello, <span data-key="name">world</span></p>