babel-plugin-inline-react-svg icon indicating copy to clipboard operation
babel-plugin-inline-react-svg copied to clipboard

Emit class components to circumvent `defaultProps` warnings

Open Grohden opened this issue 9 months ago • 0 comments
trafficstars

I'm changing the code emission so that it emits class components so that we don't get defaultProps deprecated warnings anymore

This is all based on this suggestion here https://github.com/airbnb/babel-plugin-inline-react-svg/pull/129#issuecomment-2525330068 but since that would change the fundamental idea behind the PR (still emit functions but use assign to merge defaultProps + use a flag at the plugin level to preserve behavior), I'm opening a new one

And to make it clear: we're aware that, at least in NextJS, SSR does not support class components, but we'll consider that a fault of NextJS itself.

Grohden avatar Feb 16 '25 00:02 Grohden