I am trying to fix this lint error at line const def = (props) => {
in following sample code.
const propTypes = {
prop1: PropTypes.string,
pr
The return statements should place in one line. Or the other option is to remove the curly brackets that bound the HTML statement.
example:
return posts.map((post, index) =>
<div key={index}>
<h3>{post.title}</h3>
<p>{post.body}</p>
</div>
);
You must return something
instead of this (this is not the right way)
const def = (props) => { <div></div> };
try
const def = (props) => ( <div></div> );
or use return statement
const def = (props) => { return <div></div> };