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

202
Views
What's the "context" in "TypeError ... cannot be accessed in this context"?

In trying to solve my own problem that I asked about over here, I added some console debugging statements:

return ( 
  <Controller
    control={control}
    name={name}
    key={headline + '_' + name + '_' + i}
    defaultValue=''
    render={({ field, formState, fieldState }) => { 
      console.log('field is');
      console.dir(field, { depth: null});
      console.log('formState is');
      console.dir(formState, { depth: null});
      console.log('fieldState is');
      console.dir(fieldState, { depth: null});
      return React.cloneElement(item.component, { 
        inputRef: field.ref,
        error: !!fieldState.error,
        helperText: fieldState.error?.message,
        FormHelperTextProps: { error: true } 
      })
    }}
  />
);

If I drill into what that outputs, I see

[Log] field is (src_Login_js.chunk.js, line 395)
[Log] Object (src_Login_js.chunk.js, line 396)
  name: "username"
  onBlur: function()
  onChange: function()
  ref: function()
    arguments: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.
    caller: TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in this context.
    length: 1
    name: ""
    Function Prototype
  value: ""

What I want to know is, does the context refer to my console.logs, or is that an actual error in the render props which I should further investigate?

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!