Closed dpikt closed 2 years ago
@chawes13 I've gathered some recommendations to start removing lp-hoc
from the lp-components
dependency tree.
- '@launchpadlab/lp-hoc/lib/adaptToReactRouter' // RECOMMENDATION: Move and rewrite to "local/hoc"
- '@launchpadlab/lp-hoc/lib/cloudinaryUploader' // RECOMMENDATION: if it's only used by the cloudinary-file-input rewrite upload function directly into the component if not, move the hoc to the lp-components as "local/hoc"
- '@launchpadlab/lp-hoc/lib/modifyProps' // RECOMMENDATION: Move dependency to lp-components. Perphaps to "local/hoc"
- '@launchpadlab/lp-hoc/lib/sortable' // RECOMMENDATION: not used, remove from util and advice if needed to use to import from the deprecated lp-hoc library
- '@launchpadlab/lp-hoc/lib/sortablePropTypes' // RECOMMENDATION: not used, remove from util and advice if needed to use to import from the deprecated lp-hoc library
- '@launchpadlab/lp-hoc/lib/toggle' // RECOMMENDATION: Move dependency to lp-components.
- '@launchpadlab/lp-hoc/lib/togglePropTypes' // RECOMMENDATION: Move dependency
- '@launchpadlab/lp-hoc/lib/onOutsideClick' // RECOMMENDAITON: use https://www.npmjs.com/package/react-outside-click-handler instead
I've only made recommendations for the imports in utils/index.js
since it might be a good starting point.
Let me know your thoughts.
Since we're defaulting to hooks over HOCs in our client projects, it makes sense to follow this practice in our component lib as well.