Warning in console.
Closed this issue ยท 10 comments
@armenzg should I resolve this?
Yes, please!
propTypes warnings are not super critical but it can sometimes show a bug unknown to the developer.
@armenzg sure, but when I will remove the required , then it will ask for its default value what do you think should I place default value of yLabel
?
I believe it is string. You can verify this by using the debugger and inspecting the value.
Yes, it is a string, but is undefined
in everywhere Tp6 Microsoft
@armenzg feel free to review ๐
In all cases here it was undefined
.
const {
series, dayRange, includeSubtests, title, yLabel,
} = this.props;
This fn sets it actually sets it if it is `undefined`.
export const generateChartJsOptions = (meta, yLabel) => {
const higherIsBetter = (meta.lower_is_better === false);
const reversed = higherIsBetter;
const label = yLabel || (higherIsBetter ? 'Score' : 'Execution time (ms)');
return chartJsOptions(reversed, label);
};
So I think I should set default to undefined
, will update the PR ๐
Congrats on your first code landing on this repo!
๐
@armenzg I think sentry
addition was first ๐
That's over a week old! I can't remember that far ๐
Thanks again for both contributions!