i am trying to launch my react app and when i do NPM start the app compiles but chrome will not load the app just gives me Error code: Out of Memory. It has somthing to do with the footer when i remove the footer tag from the portfolio container it loads, but with it i get the above error.
import React, { useState } from 'react';
import NavTabs from './NavTabs';
import Home from './pages/Home';
import Projects from './pages/Projects'
// import About from './pages/Home';
import Resume from './pages/Resume';
import Contact from './pages/Contact';
import Footer from './Footer';
export default function PortfolioContainer() {
const [currentPage, setCurrentPage] = useState('Home');
// This method is checking to see what the value of `currentPage` is. Depending on the value of currentPage, we return the corresponding component to render.
const renderPage = () => {
if (currentPage === 'Home') {
return <Home />;
}
if (currentPage === 'Projects') {
return <Projects />;
}
if (currentPage === 'Resume') {
return <Resume />;
}
return <Contact />;
};
const handlePageChange = (page) => setCurrentPage(page);
return (
<div>
<div className="portfolio-container">
{/* We are passing the currentPage from state and the function to update it */}
<NavTabs currentPage={currentPage} handlePageChange={handlePageChange} />
{/* Here we are calling the renderPage method which will return a component */}
{renderPage()}
</div>
<Footer />
</div>
);
}