Go ProSign in

This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In


    Refs in React

    Akash GuthaAkash Gutha

    A ref is short for reference. A ref is used for referencing a DOM element and interacting with that DOM node directly.

    Though this is a step away from React's approach of rendering through props, React's docs specify a few good use cases for Refs:

    1. Managing focus, text selection, or media playback.

    2. Triggering imperative animations.

    3. Integrating with third-party DOM libraries.

    Link to the repo: https://github.com/AkashGutha/egghead-singles/tree/master/20-create-refs

    You must be a Member to view code