Expected to return a value at the end of arrow function , this is a common problem one can face easily while using react JSX in strict mode
contentType = id => {
console.log('') if (id === 'COURSE') { return <div>{id}</div> } if (id === 'PROJECT') { return <div>{id}</div> }
}
right ans is
}
dont leave without no return at the end , at react strict mode this happen , last and default condition always goes at the end with no extra block