简体   繁体   中英

JSX.IntrinsicElements.div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>

in this program i am trying to display 3 images using JSX of ReactJS.This code is working perfectly when i use

tag or tag in place of import React from "react"; import ReactDom from "react-dom";

ReactDom.render(
  <div>
    <h1>programmers pic</h1>
    <div>
      <img src="some url">
      <img src="some url">
      <img src="some url">
    </div>   
  </div>,document.getElementById("root");
  1. Your img tags don't have closing tags.
  2. Second img tag should have src instead of scr .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM