Skip to content

Instantly share code, notes, and snippets.

View plusgut's full-sized avatar

Carlo Jeske plusgut

View GitHub Profile
import { Store } from "@plusnew/core";
export default function <T, U extends Store<T, any>>(
key: string,
initialValue: T,
callback: (value: T) => U
): U {
const result = localStorage.getItem(key);
let store: U;
if (result === null) {
import plusnew, { component, Props, store } from "@plusnew/core";
import { ElementLifecycle } from "@plusnew/driver-dom";
type props = {
children: any;
};
export default component(
__dirname,
(Props: Props<props>, componentInstance) => {