You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

lape

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

lape

State manager for React


Version published
Weekly downloads
212
decreased by-0.93%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Lape

ugnissoftware.github.io/lape/

Simple state manager for React built on Proxies.

Supports only the latest browsers.

Example

// STATE.ts
import { lape } from "lape";

export interface State {
  count: number;
  deep: {
    nest: boolean;
  };
}

const defaultState: State = {
  count: 0,
  deep: {
    nest: true,
  },
};

export default lape(defaultState);
// APP.tsx
import { connect } from "lape";
import state from "./state";

const action = () => {
  state.count += 1;
};

class App extends React.Component {
  render() {
    return <div onClick={action}>{state.count}</div>;
  }
}

export default connect(App);

FAQs

Package last updated on 10 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc