Refs

  • Always use ref callbacks. eslint: react/no-string-refs

    1. // bad
    2. <Foo
    3. ref="myRef"
    4. />
    5. // good
    6. <Foo
    7. ref={(ref) => { this.myRef = ref; }}
    8. />