'React' must be in scope when using JSX react/react-in-jsx-scope?

前端 未结 6 1624
-上瘾入骨i
-上瘾入骨i 2020-12-08 09:08

I am an Angular Developer and new to React , This is simple react Component but not working

import react , { Component}  from \'react\';
import         { re         


        
6条回答
  •  鱼传尺愫
    2020-12-08 09:38

    For those who still don't get the accepted solution :

    Add

    import React from 'react'
    import ReactDOM from 'react-dom'
    

    at the top of the file.

提交回复
热议问题