Readdy Write

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

02.03.2021 (๐Ÿ‘4548)

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

 

Fehlermeldung in React

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

 

Fehlerhafter Code :

 

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

<EditIcon />

</Fab>

</Link>

Solution:

Mit einem umfassenden 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 >--

)


0,00 €