Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<button>New Todo</button>
<button>Load more...</button>
);
},
onNewTodo: function() {
this.props.store.addTodo(prompt('Enter a new todo:', 'Try mobservable at home!'));
},
loadMore: function() {
this.props.store.loadTodosAsync();
}
}));
// React component that responds to changes in its 'todo'
var TodoView = reactiveComponent(React.createClass({
displayName: 'TodoView',
render: function() {
var todo = this.props.todo;
return (<li>
<input checked="{" type="checkbox">
{todo.title}{' '}
<a href="#">[edit]</a>
<a href="#">[remove]</a>
</li>);
},
onToggleCompleted: function() {
this.props.todo.completed = !this.props.todo.completed;
},
import React from 'react';
import {reactiveComponent} from 'mobservable';
// React component that responds to changes in 'todos'
export var TodoList = reactiveComponent(React.createClass({
displayName: 'TodoList',
render: function() {
var store = this.props.store;
return (<div>
<ul>
{ store.todos.map((todo, idx) =>
()
) }
{ store.pending ? (<li>Loading more items...</li>) : null }
</ul>
<hr>
Completed { store.completedCount } of { store.todos.length } items.<br>
<button>New Todo</button>
<button>Load more...</button>
</div>);
display: hideParamsButton, paddingTop: 1.1, paddingBottom: 0.9, marginRight: 3, marginLeft: 12, fontSize: 20, borderColor: 'red' }}
onMouseEnter={() => {this.mouse[25] = 'blue'}} onMouseLeave={() => {this.mouse[25] = '#000' }} >
Shrink Parameters
<div style="{{paddingBottom:">
</div>
)}
};
reactMixin(B2X.prototype, require('./node_modules/react/lib/AutoFocusMixin'));
B2X.defaultProps = {key: 'B2X'};
let B2 = mobservable.reactiveComponent(B2X);
React.render(, document.getElementById('divSix'));