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

207
Views
Uncaught TypeError: Cannot read properties of null (reading 'useState'); and ı cant use react flag select

** Uncaught TypeError: Cannot read properties of null (reading 'useState')**

   import { useState } from 'react';
import React from 'react';
import Slider from "react-slick";
import ReactFlagsSelect from 'react-flags-select';
import { FaFacebook } from 'react-icons/fa';


export default function Slide() {
    const [selected, setSelected] = useState('TR');
    const settings = {
        dots: false,
        infinite: true,
        arrows: false,
        speed: 500,
        slidesToShow: 1,
        slidesToScroll: 1
    };
    const flags = {
        US: '+1',
        GB: '+5',
        FR: '+70',
        DE: '+30',
        IT: '+11',
        TR: '+90',
    }
.
.
.
.
<div className="flex gap-x-3">
    <ReactFlagsSelect
       countries={Object.keys(flags)}
       customLabels={flags}
       selected={selected}
      onSelect={code => setSelected(code)}
                            />

and same problem occurs with react-select-flag, i just want to use react select flag with npm???

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!