CodeDocu.com

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 >--

)

 

 

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


Software Entwicklung Stuttgart Nürtingen
Suche Projekte C#, WPF, Windows App,ASP.Net, vb.Net, WinForms, SQL Server, Access, Excel