Javascript 折叠can的ReactJS href属性';不要拿道具当价值

Javascript 折叠can的ReactJS href属性';不要拿道具当价值,javascript,reactjs,bootstrap-4,href,react-component,Javascript,Reactjs,Bootstrap 4,Href,React Component,当我单击Collapse.js中的按钮时,必须显示卡组件。但它不会将“props.href1”放入href属性中。它给出了以下错误: 第11:20行:分析错误:意外标记,应为“…” 11 | href=“#”{this.props.href1} 这是App.JS import React,{Component}来自'React'; 从“react dom”导入react dom; 从“/components/Collapse”导入折叠; 从“/components/Card”导入卡片; 导入“

当我单击Collapse.js中的按钮时,必须显示卡组件。但它不会将“props.href1”放入href属性中。它给出了以下错误:

第11:20行:分析错误:意外标记,应为“…” 11 | href=“#”{this.props.href1}

这是App.JS

import React,{Component}来自'React';
从“react dom”导入react dom;
从“/components/Collapse”导入折叠;
从“/components/Card”导入卡片;
导入“/App.css”;
函数App(){
返回(
);
}
ReactDOM.render(
,
document.querySelector(“#root”)
);
导出默认应用程序更改为

href={`#${props.href1}}
href=“#”{this.props.href1}
更改为
href={this.props.href1}