【发布时间】:2015-06-04 07:42:47
【问题描述】:
我正在学习 reactjs 的通量架构,同时阅读这篇文章:https://medium.com/brigade-engineering/what-is-the-flux-application-architecture-b57ebca85b9e
在以下上下文中,我似乎无法理解作者所说的“组件通过调用自己的回调来处理表单提交”是什么意思:
// Saving a new ToDo calls the '_onSave' callback
var Header = React.createClass({
/**
* @return {object}
*/
render: function() {
return (
<header id="header">
<h1>todos</h1>
<TodoTextInput
id="new-todo"
placeholder="What needs to be done?"
onSave={this._onSave}
/>
</header>
);
},
【问题讨论】:
标签: reactjs reactjs-flux