When using @svgr/webpack, the generated React components for SVGs still include defaultProps, which results in the following warning in the console when using React. "Warning: Component.defaultProps is not supported in React future releases. Use JavaScript default parameters instead." I've tried various approches to reolve but no luck till now. currently i'm using this config for the svgr/webpack // svgr.config.js { expandProps: ,false replaceAttrValues: {}, prettier: true, typescript: true, // if you're using TypeScript jsxRuntime: 'automatic', // or 'classic' depending on your setup // Disable defaultProps svgo: true, svgoConfig: { plugins: [ { name: 'removeViewBox', active: false, }, ], }, template: (variables, { tpl }) => { return tpl` import * as React from 'react'; const ${variables.componentName} = ({ title = "default title", ...props }) => ( ${variables.jsx} ); export default ${variables.componentName}; `; } };
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by Naveen-Bhati and has received 0 comments.