**Describe the problem** <!-- This is a detailed description. It should provide more background information about the issue and whom it affects. --> React version 18 doesn't use `defaultProps` anymore. It gave this warning every time I ran the app, and the logs are very long, it kind of annoying.  The root of the problem here: https://github.com/elastic/eui/blob/main/src/components/button/button.tsx#L135 Other components might also be affected. ## Proposed solution Before ``` EuiButton.defaultProps = { size: 'm', color: 'primary', }; ``` After ``` export const EuiButton = ({ size = 'm', color = 'primary' }) => { // Your component logic here return ( <EuiButton size={size} color={color}> Button </EuiButton> ); }; ``` You can set default values directly within the component function.
Activity
JasonStoltz commentedon Oct 16, 2023
Hey team 👋 . I marked this as high priority and sized it as small. Let's see if we can get this cleaned up quickly.