Answer the question
In order to leave comments, you need to log in
How to implement common functionality for all (several) components?
In a typical React component library, all components inherit from React.Component. But what if we suddenly needed common functionality for all components? Well, for example, the property is hidden, disabled, variation, etc. How to be?
Answer the question
In order to leave comments, you need to log in
Waiting for January to release hooks, or using alpha now is the prettiest method :)
https://www.reactjs.org/hooks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question