0.3.0 • Published 5 years ago
@impress/core-store v0.3.0
@impress/react
Modular Data-View binding mechanism for React
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}
/>
)
});
0.3.0
5 years ago