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

186
Views
Reactjs : Getting a input value from many inputs

Im trying to get some input value from a library(https://www.npmjs.com/package/react-auth-code-input) , but im getting an error TypeError: Cannot read properties of undefined (reading 'value')

code :

  {...}
const Login = ({loginUser}) =>{
  const history = useHistory();
  const [showPopup, setShowPopup] = useState(false);
  const [Token,setToken] =useState(0);


  return (
    <div>
      <StyledFormArea>
        <TextLink to="/home">
           {...}
 <AuthCode
                          characters={6}
                          onChange= {e => setToken(e.target.value)}
                          containerClassName="Input"
                          inputClassName="input"
                        />
{...}

someone knows an function that gets more than one input value ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The onChange method from the library definition tells you that the return value is the a string (assuming it’s the input string value), no the event. So instead of e.target.value it would just be e (I would rename this :) )

For reference here is the definition of the onChange method implementation from the library (found here)

Callback function called every time an input value changes

So the onChange Will give you the text value of the input.

about 4 years ago · Juan Pablo Isaza Report
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!