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

103
Views
UseSelector undefined is not a function

Throws an error undefined is not a function (near '...(0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(state => state.files).map...'). enter image description here I wrap it in a function - the error is also similar, tell me what I wrote wrong? File list

const FileList = () => {
    
           const files = useSelector((state) => state.files).map((file) => <File key={file.id} file={file}/>)
    
        return (
            <div className="container">
            <div className='filelist'>
                <div className="filelist__header">
                    <div className="filelist__name">name</div>
                    <div className="filelist__date">date</div>
                    <div className="filelist__size">size</div>
                </div>
                {files}
            </div>
            </div>
        );
    };

File

const File = ({file}) => {
    return (
        <div className='file'>
            <img src={file.type === 'dir' ? dirLogo : fileLogo} alt="" className="file__img"/>
            <div className="file__name">{file.name}</div>
            <div className="file__date">{file.date.slice(0,10)}</div>
            <div className="file__size">{file.size}</div>
        </div>
    );
};
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!