Skip to content

React blank page when I try to import from another component

The react app was working perfectly until I tried to import AlertDialogSlide from confirmation.js component. There are no errors while compiling but I have a blank page.

import './App.css';
import StarRating from './StarRating';
import StarRating2 from './StarRating2';
import StarRating3 from './StarRating3';
import { TextArea } from 'semantic-ui-react';
import AlertDialogSlide from './confirmation';

function App() {
  return (
    
    <form>
    
    <div className="App">
     <img src='solavievelogo.png'></img>
      <hr/>
      <h2>Leave a feedback!</h2>
     <StarRating></StarRating>
     <hr2/>
     <StarRating2></StarRating2>
     <hr2/>
     <StarRating3></StarRating3>
     <hr2/>
     <AlertDialogSlide></AlertDialogSlide>
     <p>Please leave a comment about your experience below:</p>
     <TextArea cols="40" rows="5" placeholder=' Type your comment here...' ></TextArea>
     <br/>
    <button class="Button" type="submit" ><span class="Button-inner">SEND FEEDBACK</span> </button>

    </div>

    </form>
    
  );
}

export default App;

Answer

check out your confirmation.js file. Maybe you make some mistake on that. I run this code after commenting confirmation.js file, it’s working properly.

If you still have a problem share your confirmation.js file… we are ready to help 😊