react-bootstrap
Version:
Bootstrap 3 components build with React
15 lines (12 loc) • 411 B
JavaScript
export default function deprecationWarning(oldname, newname, link) {
if (process.env.NODE_ENV !== 'production') {
if ((typeof console === 'undefined') || (typeof console.warn !== 'function')) {
return;
}
let message = `${oldname} is deprecated. Use ${newname} instead.`;
console.warn(message);
if (link) {
console.warn(`You can read more about it here ${link}`);
}
}
}