Conditional React Component
Tiny helper which allows you to apply component enhancements by condition.
npm i -S condicom
Simple CSS only enhancement. For ex. you have component
Link with some basic styles.
;; // file with default theme;Link.defaultProps =;
But, also, you have theme for this component. Of couse you don't want to have all of this CSS on the every page.
;;; // file with extra theme;
Then in Project 1.
And in Project 2.
;;;;;// IT'LL BE APPLIED ONLY WITH MATCHED PROPS;
NOT FOR CSS ONLY
You can make any compositions by conditions.
In Project 3.
;;;;;;// IT'LL APPLY ALL ENHANCEMENTS;