Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

✅ Solved TS3657: (JS) JSX expressions must have one parent element.ts (2657)

02.03.2021 (👁334)

TS3657: (JS) JSX expressions must have one parent element.ts (2657)

 

Error message in React

 

TS3657: (JS) JSX expressions must have one parent element.ts (2657)

 

Faulty code:

 

<Link to={"//" + this.state.idarticle}><Fab color="secondary" aria-label="edit" style={{ float: 'right' }}>

<EditIcon />

</Fab>

</Link>

Solution:

With a comprehensive DIV element

this.state.loading ?

 (

  //--< IsLoading >--

  <div>

     <p>loading..</p>

 

    <Link to={"//" + this.state.idarticle}>
       <
Fab color="secondary" aria-label="edit" style={{ float: 'right' }}>

          <EditIcon />

       </Fab>

    </Link>

 </div>

 //--</ IsLoading >--

)