React报错之Function components cannot have string refs
总览当我们在一个函数组件中使用一个字符串作为<coderef</code时,会产生&34;Functioncomponentscannothavestringrefs&34;错误。为了解决该错误,使用<codeuseRef()</code钩子来得到一个可变的<cod
总览当我们在一个函数组件中使用一个字符串作为<coderef</code时,会产生&34;Functioncomponentscannothavestringrefs&34;错误。为了解决该错误,使用<codeuseRef()</code钩子来得到一个可变的<cod