You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
svinokot a0028c3ef0 1.6.1 2 weeks ago
nbproject readme 10 months ago
test 1.6.1 2 weeks ago
.gitignore readme 10 months ago
LICENSE license 9 months ago
index.d.ts 1.6.1 2 weeks ago
index.js npm 1.1.0 10 months ago
package-lock.json 1.6.0 2 weeks ago
package.json 1.6.1 2 weeks ago
readme.md 1.6.0 2 weeks ago
tsconfig.json lens-js 1.5.1 3 months ago
webpack.config.js npm 1.2.3 10 months ago

readme.md

It is the typings for lens-js

It is the simple state manager for web apps with TS typings. It is implementation of Object-relative method of data organizing. So, let try...

Wiki

Initialize

import { Lens, LensUtils } from '@vovikilelik/lens-ts';
  • Lens - base lens class;
  • LensUtils - some usefull functions for fun;

Typing

// Create interface first
interface State {
    name: string;
    color?: number;
    basket?: any[];
}

// Initialize store and create lens
export const store = LensUtils.createLens<State>({ name: 'Bob' });

For more help, please look this repository