I am very new with React and am getting a blank screen when running 'yarn start'. I have been trying to figure this out for a while and have tried everything I could find. I have even tried making it a production build. This has been so frustrating. Help would be much appreciated. Sam
import { toast, ToastContainer } from 'react-toastify';
import React, { Component } from 'react';
import { Router, Route, Routes } from 'react-router-dom';
import './App.css';
import Home from './Components/Home/home';
import Profile from './Components/Profile/profile';
import SidePanel from './Components/SidePanel/sidePanel';
import SignIn from './Components/Signin/signin';
import Signup from './Components/Signup/Signup';
class App extends Component {
showToast = (type, message) => {
switch (type) {
case 0:
toast.warning(message)
break;
case 1:
toast.success(message)
default:
break;
}
}
render(props) {
return (< Router >
<ToastContainer
autoClose={2000}
hideProgressBar={true}
position={toast.POSITION.TOP_CENTER}
/>
<Routes>
<Route
exact
path="/"
render={prop => <Home {...props} />}
/>
<Route
path="/signin"
render={prop => <SignIn showToast={this.showToast} {...props} />}
/>
<Route
path="/signup"
render={prop => <Signup showToast={this.showToast} {...props} />}
/>
<Route
path="/profile"
render={prop => <Profile showToast={this.showToast} {...props} />}
/>
<Route
path="/chat"
render={prop => <SidePanel showToast={this.showToast} {...props} />}
/>
</Routes>
</Router>
);
};
};
export default App;
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>