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 8a63946d5c v1.6.4 4 months ago
nbproject v1.6.3 4 months ago
test v1.6.3 4 months ago
.gitignore v1.6.3 4 months ago
LICENSE v1.6.3 4 months ago
index.d.ts v1.6.3 4 months ago
index.js v1.6.3 4 months ago
package-lock.json v1.6.4 4 months ago
package.json v1.6.4 4 months ago
readme.md v1.6.3 4 months ago
tsconfig.json v1.6.3 4 months ago
webpack.config.js v1.6.3 4 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