0.3.0 • Published 5 years ago

@impress/core-store v0.3.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

@impress/react

@impress/react logo

Modular Data-View binding mechanism for React

npm npm type definitions npm bundle size build status code coverage

Install

npm i @impress/react

Example

import { store, useProvide } from "@impress/react";

class User {
  @store name = "John";
}

const UserNameEditor = React.memo(() => {
  const user = useProvide(User);
  return (
    <input
      onChange={(e: any) => user.name = e.target.value}
      value={user.name}
    />
  )
});

Example on codesandbox