How to create perfect Avatar Component | React | Beginners

Поделиться
HTML-код
  • Опубликовано: 7 янв 2022
  • If you think this is helpful to you, you can buy me a coffee:
    www.buymeacoffee.com/imdebugger
    Participate in the debugger community on the Discord server.
    / discord

Комментарии • 13

  • @Boskimiszcz007
    @Boskimiszcz007 Год назад

    Hi man, nice job, as someone wrote before, object-fit: cover might have been better for this case, however you made a nice working component and you have also explained nicely what you were doing on the way.
    The only advice for the future that I would give is to keep the code clean. By that I mean for example to extract string values to consts, so you don't have to paste those long strings into the html code. It keeps the code more readable and you also don't have to repeat the links in onError.
    Also, if you use the onError hook, you don't need the if-else statement in the return of Avatar.js - it'll work even if 'src' param is empty.
    These are little things that keep the code looking neat and clean and also make you look more professional in front of other people - be it your co-workers or viewers.
    Having said that, as I mentioned before the tutorial was really good and I hope to see more of your work in the future. Best of luck and keep it up!

    • @_debugger_
      @_debugger_  Год назад

      I really appreciate your valuable suggestions which improve my coding quality thank you so much. I'll keep everything in my mind in future videos.

    • @Boskimiszcz007
      @Boskimiszcz007 Год назад

      @@_debugger_ you're welcome, please keep up with your good work! :)

    • @_debugger_
      @_debugger_  Год назад +2

      @@Boskimiszcz007 I'll pinned this comment up because it really deserve it.

  • @nefed-L
    @nefed-L 19 дней назад

    Thanks!

  • @jeremihadebayoakingbade459
    @jeremihadebayoakingbade459 Год назад

    Very useful

  • @abdelrahmanaboelyazeed7664
    @abdelrahmanaboelyazeed7664 Год назад

    css image doesn't work and idk why

  • @_debugger_
    @_debugger_  Год назад

    Participate in the debugger community on the Discord server.
    discord.gg/BGkTfyxN

  • @assk477
    @assk477 Год назад

    i think object-fit: cover is better in this situation

  • @ariell121
    @ariell121 2 года назад

    Bad audio

    • @_debugger_
      @_debugger_  2 года назад +1

      Thankyou, I will be take care of this next time.