Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

465
Views
The above error occurred in the <Connect(App)> component:

I'm new to react and all of its components and stuff, and im following a youtube video where the code is like this. I get an error with the "checked: session.checked" line where checked is undefined. I have no idea how to fix this and ive been searching all over the web trying to find an answer. Do any of you know what the problem is?

//pages
import Home from './pages/Home'
import Login from './pages/Login'
import Signup from './pages/Signup'
import Dashboard from './pages/Dashboard'

import { BrowserRouter as Router, Routes, Route } from "react-router-dom";

import './scss/base.css';
import { StyledContainer } from './components/Styles'

import "react-loader-spinner/dist/loader/css/react-spinner-loader.css";

import AuthRoute from './components/AuthRoute.js';
import BasicRoute from './components/BasicRoute.js';
import { connect } from 'react-redux';

function App({ checked }) {
  return (
    <Router>
      {checked && (
        <StyledContainer>
          <Routes>
            <AuthRoute exact path="/" element={<Home />} />
            <AuthRoute exact path="/dashboard" element={<Dashboard />} />
            <BasicRoute exact path="/login" element={<Login />} />
            <BasicRoute exact path="/signup" element={<Signup />} />
          </Routes>
        </StyledContainer>
      )}
    </Router>
  );
}

const mapStateToProps = ({ session }) => ({
  checked: session.checked
});

export default connect(mapStateToProps)(App);

The video im following is https://www.youtube.com/watch?v=HCnHYz6TXA4&list=PLk8gdrb2DmChrL50moKeFNAVnFqZ3GLF7&index=6, and its 1h and 52m in when i get the issue

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!