I m trying to import component but i m not able to do it
I have also tried export default class App extends React.Component instead of class App extends Component() but it is not solving my problem
import React from 'react';
import React,{Component} from 'react';
import './App.css';
class App extends Component() {
  constructor(props){
  }
  render() {
  return (
    <div className="App">
      <table className="titleBar">
        <tbody>
          <tr>
            <td>
              <img alt="app icon" width="50" src="primary_green.svg"/>
            </td>
            <td width="8"/>
            <td>
              <h1>MovieDb Search</h1>
            </td>
          </tr>
        </tbody>
      </table>
      <input style={{
        fontSize: 24,
        display: 'block',
        width: '99%',
        paddingTop: 8,
        paddingBottom: 8,
        paddingLeft: 16
      }} placeholder="Enter Search Term"/>
    </div>
  );
 }
}
export default App;
Line 2:  Parsing error: Identifier 'React' has already been declared
import React from 'react';
import React,{Component} from 'react';
import './App.css';
On the top of code snippet React is imported twice
import React from 'react';
import React,{Component} from 'react';
It should be
import React, {Component} from 'react';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With