crie um componente em react que retorna uma imagem do neymar in javascript

index.tsx
import React from 'react';
import neymarImage from './neymar.jpg';

const NeymarImage = () => {
  return (
    <div>
      <img src={neymarImage} alt="Neymar" />
    </div>
  );
};

export default NeymarImage;
210 chars
13 lines
  1. Import React Library.
  2. Import NeymarImage from a local file.
  3. Create a NeymarImage component with an arrow function that returns a div containing an img tag.
  4. Import the Neymar image from a local file.
  5. Use the imported image as the source of the img tag.

gistlibby LogSnag