Resolve CRA Build blank page

How to solve create react app build blank page.

React Js is a great framework for build beautiful sleek and fast single page applications. Once anyone is done build an app the next thing is to deploy it to the Cpanel or any hosting channel which support deployment. But one issue you may face is the problem of having this blank screen after you build your react js application which totally upsets you, below are the procedures you can use to resolve it.

These are Two types of solution

import React from\"react\";
import { withRouter } from\"react-router-dom\";
const FOLDER_NAME = \"/portfolio/\";
function Login() {
function App() {
  const { pathname } = window.location;
  // Get the pathname
  const SwitchRoutes = (pathname) => {
    switchwith the pathname
    switch (pathname) {
        return<Login />;
        return<div>No route</div>;
} exportdefault App;

OR  you are using react router dom

<Router basename=\"/portfolio/\">
      <Allroutes />

\r\n \r\n