Why is useState not triggering a re-render on a string

前端 未结 0 1705
盖世英雄少女心
盖世英雄少女心 2021-02-11 02:12

i have the following code:

const [error, setError] = useState(\'\');

const errorResponse = error => {
  // do something
  console.log(error.message); // Netwo         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题