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
Yes, both prefer-stateless-function should skip over comps with childContextTypes, and we should have a separate rule that prevents childContextTypes on an SFC.
If you try to set
childContextTypes
on a stateless functional component, React will give you the following warning:https://github.com/facebook/react/blob/2058d47e7bfaccf0983aaf673d86acd89d7918ce/src/renderers/shared/stack/reconciler/ReactCompositeComponent.js#L60
The prefer-stateless-function rule should allow this.
Related #501.
The text was updated successfully, but these errors were encountered: