React报错之Expected an assignment or function call and instead saw an expression

正文从这开始~ 总览 当我们忘记从函数中返回值时,会产生"Expected an assignment or function call and instead saw an expression"错误。为了解决该错误,确保显式地使用return语句或使用箭头函数隐式返回。 下面有两个示例来展示错误

你可能感兴趣的:(React报错之Expected an assignment or function call and instead saw an expression)