这是我的代码
import React from "react";
import s from "./Cars.module.css"
export default (props) => (
<div className={s.cars} activeClassName={s.active}>
<div className={s.car}>
<p>Company: {props.company}</p>
<p>Model: {props.model}</p>
<p>Price: {props.price}$</p>
<button onClick={props.onChangeTitle}>Click</button>
</div>
</div>
);
控制台中显示错误:
React does not recognize the activeClassName prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase activeclassname instead. If you accidentally passed it from a parent component, remove it from the DOM element.
因为它可以是什么?
“div”标签没有这样的属性“activeClassName”。“链接”标签有