
[英]Inserting \n to break line in JavaScript template string conditionally rendered in React Bootstrap Button component is ineffective
我的 React 组件的一部分是由 React Bootstrap Button 组件组成的。 在这一个中,我根据以下代码根据其切换的 state 有条件地呈现一个字符串: 如您所见,我包含了 \n 是因为我想将日期和标题放在按钮的不同行上,为此我也将其显示为一个块(而不是默认的内联块)。 应用程序 ...