1.0.0 • Published 6 years ago
@cqrsfk/sync-react v1.0.0
sync-react
data synchronize for react
Use
import {sync} from "@cqrsfk/sync-react";
class UI extends React.Component{
async componentWillMount() {
this.userProto = await domain.create<User>("User", []);
this.ud = sync(this, "user");
const user = this.userProto.$sync(this.ud);
this.setState({
user
});
}
}
1.0.0
6 years ago