0.3.1 • Published 4 years ago

@impress/di v0.3.1

Weekly downloads
6
License
MIT
Repository
github
Last release
4 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

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago