Can not see image in react listItem

Hi, I follow the docs but can not see image in react listItem,
and its not shown in the docs but below code is not working when I omit the alt prop

PS:listItem docs uses both media-list and medialist for List, I tried both

    <List media-list>
      <ListItem link="/login/" title="Login" panelClose>
      <img alt="" slot="media" src="../../assets/demo/noimage1.jpg"/>
      </ListItem>

and when I try this I get warning for class -> Invalid DOM property class.

      <ListItem link="/login/" title="Login" panelClose>
           <div class="item-content">
          <div class="item-media">
      <img alt="" src="../../assets/demo/noimage1.jpg"/>
      </div>
        </div>
      </ListItem>

If using react, try to use:
className in place for class
htmlFor in place of for

Documents does not mention that, anyway it did not solve the problem

I solved it with this line

<img alt="" slot="media" src={NoImg} width="44"/>

Not part of Framework7, actually a React thing
https://reactjs.org/docs/dom-elements.html#htmlfor
https://reactjs.org/docs/dom-elements.html#classname

Thanks for sharing your solution

2 Likes