You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, two ways are supported by React to refer to components. The first way, providing a string identifier, is now considered legacy in the official documentation. The documentation now prefers a second method -- referring to components by setting a property on the this object in the reference callback.
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
Currently, two ways are supported by React to refer to components. The first way, providing a string identifier, is now considered legacy in the official documentation. The documentation now prefers a second method -- referring to components by setting a property on the
this
object in the reference callback.Rule Details
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Rule Options
noTemplateLiterals
When set to
true
, it will give warning when using template literals for refs.Examples of incorrect code for this rule:
The text was updated successfully, but these errors were encountered: