使用React框架時,組件在使用<span>{ Math.abs(goal.goalInfo.pretimes - goal.usergoalInfo.cpt_times )}</span>這一語句時出現警告:Received NaN for the `children` attribute. If this is expected, cast the value to a string.
解決:將運算結果轉爲字符串 <span>{ Math.abs(goal.goalInfo.pretimes - goal.usergoalInfo.cpt_times ).toString() }</span>