首页 > react-redux todo这个demo

react-redux todo这个demo

请问红框里的node是什么意思?这个ref是怎么生成的啊?


The ref Callback Attribute


一个参数,表示就是对应的元素或者组件,这儿表示的是这个input框


翻译过来是 传递 ref参数,值为一个函数,函数为

    function(node) {
       input = node;
    }

只不过上面用了 es6 箭头函数的写法进行了简化

【热门文章】
【热门文章】