This repository was archived by the owner on Feb 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
This repository was archived by the owner on Feb 18, 2022. It is now read-only.
Unknown props issue #26
Copy link
Copy link
Open
Description
I have an issue with props. My render method is something like this :
render() {
const language = this.props.language.default.portal;
const cars = this.props.cars;
const favorites = this.props.favorites;
const cartContent = this.props.cartContent;
const addToFavorites = this.props.addToFavorites;
const removeFromCard = this.props.removeFromCard;
const addToCard = this.props.addToCard;
const handleOffers = this.props.handleOffers;
const offers = this.props.offers;
const currentUserEmail = getUserEmail();
return (
<div className="cars">
<div>
<Shuffle>
{cars.map((car, i) => {
const initialReg = car.initialRegistration.slice(0,3) + car.initialRegistration.slice(6,10);
// str.slice(1, 4) extracts the second character through the fourth character (characters indexed 1, 2, and 3)
return (
<div key={i} className="carBox noPadding">
<div className="carBoxContent">
<PhotoAndFavorites car={car} language={language} changeStarIcon={this.changeStarIcon} addToFavorites={addToFavorites} userEmail={currentUserEmail} favorites={favorites}/>
<div className="carNameAndDesc">
<div><Link to="" style={{textDecoration: 'none'}}>{car.make}</Link></div>
<div>{car.desc}</div>
</div>
<div className="carPrice">
<div>{car.price}</div>
<div>{car.btw}</div>
</div>
<div className="extraFeatures" style={{marginBottom: 5, backgroundColor: '#eee'}}>
</div>
<div className="mainFeatures">
<div><img src="../images/portal/user/status/fuel-icon.png" style={{height: 12}}/> <span>{car.fuel}</span></div>
<div><img src="../images/portal/user/status/road-icon.png" style={{height: 12}}/> <span>{car.mileage}</span></div>
<div><img src="../images/portal/user/status/calendar-icon.png" style={{height: 12}}/> <span>{initialReg}</span></div>
</div>
<Buttons car={car}
language={language}
changeButton={this.changeButton}
addToCard={addToCard}
removeFromCard={removeFromCard}
cartContent={cartContent}
userEmail={currentUserEmail}
handleChange={handleOffers}
offers={offers}
opacity={this.props.opacity}
/>
</div>
</div>
);
})}
</Shuffle>
</div>
<div className="clearfix"/>
</div>
);
}
But the animation doesn't happening and I'm getting warning
bundle.js:8394 Warning: Unknown props duration, fade, initial on div tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
Metadata
Metadata
Assignees
Labels
No labels