Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

468
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda