如何在FormattedMessage中转义括号?

时间:2019-01-18 22:29:08

标签: javascript reactjs react-intl

我不知道如何在下面的代码中转义花括号:

[React Intl] Error formatting the default message for: "some.id"
Error: The intl string context variable 'make();' was not provided to the string '```
import "sth";
run()
{
make();
}
```'

在浏览器控制台中,我看到此错误:

make();

我不希望public class First { public int x = 0; public Second second; public First() { second = new Second(this); } public run() { second.change(); } } public class Second { private First _first; public Second(First first) { _first = first; } public change() { first.x = 2; } } 是上下文变量。它应该只是字符串的一部分。

0 个答案:

没有答案
相关问题