As per React 18.3 ‘defaultProps’ is deprecated. So I have removed it from my functional component and used default parameter. But in my propTypes object I have made a property as required. Now since I have removed defaultProps, I am getting below warning in console.
<code>Warning: Failed prop type: The prop `loadChart` is marked as required in `HistogramChart`, but its value is `undefined`.
</code>
<code>Warning: Failed prop type: The prop `loadChart` is marked as required in `HistogramChart`, but its value is `undefined`.
</code>
Warning: Failed prop type: The prop `loadChart` is marked as required in `HistogramChart`, but its value is `undefined`.
How should I remove this warning?