DEV Community

Discussion on: Ref error

Collapse
 
dance2die profile image
Sung M. Kim • Edited

Hi Michael.

Is this a question? a post or a #devjournal?

Collapse
 
michaelli91 profile image
Michael Li • Edited

Hi, Sung M.
Thanks for your reply.
Yes, it is a question,
To be honest I am a beginner.
So If you can guide for me, it will be great pleasure.

Collapse
 
dance2die profile image
Sung M. Kim • Edited

The callback refs is what you've used to get the AUserList's ref.

In that case you don't access the ref with .current like this.list.current but as this.list.

You also don't create this.list with React.createRef() with callback ref.

Can you provide a minimal runnable sample with CodeSandbox.io or Stackblitz if it still doesn't work?