Target container is not a DOM element

1、错误描述

Target container is not a DOM element_第1张图片

2、错误原因

import React, {Component} from 'react';
import {render} from 'react-dom';
import Button from 'react-bootstrap/Button'

const ProPic = (props) => {
	return (
		
	);
}

const PicLink = (props) => {
	return (
		
		  {props.name}
		
	);
}

const ImgLink = (props) => {
	return (
		
); } render( ); export default ImgLink;

     由于ImgLink是一个组件,不能直接使用render()方法,需要在组件中使用render()方法

3、解决办法

import React, {Component} from 'react';
import ReactDOM,{render} from 'react-dom';
import Button from 'react-bootstrap/Button'

const ProPic = (props) => {
	return (
		
	);
}

const PicLink = (props) => {
	return (
		
		  {props.name}
		
	);
}

const ImgLink = (props) => {
	return (
		
); } class ImgLinks extends Component { constructor(props){ super(props); this.state = {name:'张珊珊'}; } render() { return ( ); } } export default ImgLinks;

 

你可能感兴趣的:(React,FusionChart)