We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.get$()
Right now we can do:
const Todo = createModel({...}); const todo = new Todo({ title: 'My First Todo' }); const title = todo.get('title'); // `My First Todo`
It would be beneficial for form management, if we can observe Model values too:
const title$ = todo.get$('title'); title$.subscribe(x => console.log(x)); todo.set('title', 'Updated title'); // prints out title in console
Then for handling forms in component, we could do something like this with frint-react's observe:
frint-react
observe
import React from 'react'; import { observe, streamProps } from 'frint-react'; const FormComponent = React.createClass({...}); export default observe(function () { const todo = new Todo({ title: 'My todo' }); return streamProps() .set( todo.get$(), todoAttributes => ({ todo: todoAttributes }) ) .get$(); })(FormComponent);
The text was updated successfully, but these errors were encountered:
Done in #166
Sorry, something went wrong.
fahad19
No branches or pull requests
Currently
Right now we can do:
Expected feature
It would be beneficial for form management, if we can observe Model values too:
Benefit
Then for handling forms in component, we could do something like this with
frint-react
'sobserve
:The text was updated successfully, but these errors were encountered: