128
rated 0 times
[
133]
[
5]
/ answers: 1 / hits: 28367
/ 5 Years ago, tue, march 19, 2019, 12:00:00
I am using switch statement inside a react file .Getting Expression Expected error in first case line.
export default ({handle, state}) => (
<div style={styles.container} >
<h3 style={{margin: 0, marginBottom: 15}}>InputData</h3>
{items.map((item) => (
<div style={styles.lineContainer}>
switch(item.name){
case name1: return <InputBox/>;
case name2: return <SelectBox/>;
case name3: return <<SelectBox/>;/>;
default: return <InputBox/>
}
</div>
))}
</div>
);
More From » reactjs