React Expected an assignment or function call and instead saw an expression

0 votes

I want to fix lint error at line:  const def = (props) => {
This is my code:

const propTypes = {
prop1: PropTypes.string,
prop2: PropTypes.string,
prop3: PropTypes.string,
prop4: PropTypes.string,
prop5: PropTypes.string,
}

const abc = (props) => {
some code here }

const def = (props) => {
<div>
<div className=" ..some classes..">{abc}</div>
<div className=" ..some classes..">{t('translation/something')}</div>

<div ...>
  <someComponent 
    do something
  />

if (some condition) {
do this
} else {
do that
}

</div>

};

Can someone help me fix this issue?

May 23, 2022 in Others by Kichu
• 19,040 points
2,548 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer

Can an Excel xll function indicate that the return value should be displayed as a date and not a number?

To my knowledge, the only method to ...READ MORE

answered Jan 5, 2023 in Others by narikkadan
• 63,600 points
951 views
0 votes
1 answer

OR and IF function for multiple values

Your OR functions will always return TRUE ...READ MORE

answered Feb 13, 2023 in Others by narikkadan
• 63,600 points
529 views
0 votes
1 answer

Excel worksheet multi-criteria function (like Index-Match array) to fetch last value of an item, looking up by item name and date

Use: =SUMIFS(C:C,B:B,E12,A:A,MAXIFS(A:A,B:B,E12)) It will return the value at the ...READ MORE

answered Apr 6, 2023 in Others by narikkadan
• 63,600 points
785 views
+1 vote
1 answer

Between cyber security and CCNA profession which one is best in terms of time to become an expert and salary payment

CCNA professional is more inclined towards the ...READ MORE

answered Dec 18, 2019 in Others by Pri
2,043 views
–1 vote
0 answers
0 votes
1 answer

expected assignment or function call: no-unused-expressions ReactJS

The problem is that you have put ...READ MORE

answered May 20, 2022 in Others by narikkadan
• 63,600 points
3,090 views
0 votes
1 answer

How to convert HTML to JSX (React.js)

You can use https://magic.reactjs.net/htmltojsx.htm which is an online HTML ...READ MORE

answered Aug 10, 2022 in HTML by Deepak
• 980 points
1,558 views
0 votes
0 answers

Calendar React JS

I have a homework to make a ...READ MORE

Jan 27, 2023 in Others by Tejashwini
• 3,820 points
718 views
0 votes
1 answer

How can I remove a port from url for node app using nginx

If you run your node server on ...READ MORE

answered Apr 10, 2018 in DevOps on Cloud by ajs3033
• 7,300 points
4,026 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP