最佳答案
希望实现以下目标:
<div className="total total-{obj.state}">
很明显,这样的结果是:
<div class="total total-{obj.state}">
在 JSX 中有没有一种优雅的方法来计算字符串中 {}
中的表达式?