reactjs - The component handles the form submission by calling its own callback? What does calling its own callback mean in this context? -


i learning flux architecture reactjs, while reading article: https://medium.com/brigade-engineering/what-is-the-flux-application-architecture-b57ebca85b9e

i can not seem author means "component handles form submission calling own callback" in following context:

// saving new todo calls '_onsave' callback  var header = react.createclass({    /**    * @return {object}    */   render: function() {     return (       <header id="header">         <h1>todos</h1>         <todotextinput           id="new-todo"           placeholder="what needs done?"           onsave={this._onsave}         />       </header>     );   }, 

the term "callback" may incorrect here, think means he's passing function defined in header class, this._onsave child component todotextinput when todotextinput submitted, function inside header called , therefore todotextinput doesn't have know it.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -