دنبال کننده ها

۱۳۹۶ اسفند ۲۳, چهارشنبه

reactjs - Module build failed: SyntaxError: Unexpected token, expected }

[ad_1]



I'm trying to get a better understanding of why I'm getting the error that I'm getting. I've condensed things a bit to make sure that I've got a good context:code ratio for stackoverflow.



Module build failed: SyntaxError: Unexpected token, expected }



class PossibleMatches extends React.Component
constructor(props)
super(props);
this.props.getInitialPieces();


render()
return(
<div> className 'GorClothingContainer'>
<Wardrobe upperComponent=this.state.currentUpperComponent lowerComponent=this.state.currentLowerComponent currentComponent = this.state.currentComponent enableCapture=(snapshot) => this.snapshotMatch = snapshot />
<div className = "PossibleMatches_Container">
<i class = 'captureOutfit' onClick = this.snapshotMatch></i>
this.state.fieldForOrganizedPiecesArray.UpperComponents.map(function(topPiece)
Error on this line --> <UpperComponent key=topPiece.id id=topPiece.id ref=(piece)=>this.setState(currentUpperComponent: piece) setCurrentComponent = (piece) => this.setState(currentComponent.whichPiece: piece, currentComponent.whichComponent: 'u', lowerComponent: null, upperComponent: null); toggleToPiece = () => if (this.state.LowerComponentEnabled === false)this.setState(LowerComponentEnabled: true)elsereturn;.then(function()this.setState(currentLowerComponent: this.props.suggestedBottoms[0])()); image=topPiece.image isLowerComponentEnabled=this.state.LowerComponentEnabled switchComponent=this.switchFocus evaluatePiece=this.isOppositeComponentSuggested className = if (this.state.currentComponent.whichComponent === 'l')'standalonePiece'else if(this.state.currentComponent.whichComponent === 'l')'PossibleMatchCollapse' else'UpperComponent_Container'/>
);
this.state.fieldForOrganizedPiecesArray.LowerComponents.map(function(bottomPiece)
<LowerComponent key=bottomPiece.id id=bottomPiece.id ref=(piece)=>this.setState(currentLowerComponent: piece) setCurrentComponent = (piece) => this.setState(currentComponent.whichPiece: piece, currentComponent.whichComponent: 'l', upperComponent: null, lowerComponent: null); toggleToPiece=this.setState(currentUpperComponent: this.props.suggestedTops[0]).then(function()if(this.state.UpperComponentEnabled: false)this.setState(UpperComponentEnabled: true)) isUpperComponentEnabled=this.state.UpperComponentEnabled switchComponent=this.switchFocus evaluatePiece=this.isOppositeComponentSuggested className= if (this.state.currentComponent.whichComponent == 'l')'standalonePiece' else if(this.state.currentComponent.whichComponent == 'u')'PossibleMatchCollapse' else'LowerComponent_Container'/>
);
</div>
</div>
);



function mapStateToProps(state)
return contemplatedPiece: state.possibleMatches.contemplated_piece,
extraTops: state.possibleMatches.extraTops,
extraBottoms: state.possibleMatches.extraBottoms,
standaloneTops: state.possibleMatches.standaloneTops,
standaloneBottoms: state.possibleMatches.standaloneBottoms,
suggestedTops: state.possibleMatches.suggestedTops,
suggestedBottoms: state.possibleMatches.suggestedBottoms
;




[ad_2]

لینک منبع