i try to use and overwrite a parent method in child one but get Uncaught TypeError: Cannot read property 'call' of undefined
class BreadcrumbsHome extends React.Component {
getBreadcrumbs = () => [{name: 'home', url: '/'}];
render() {
return <nav>
<ol className="breadcrumb float-sm-right">
{!!this.getBreadcrumbs && this.getBreadcrumbs().map((e, i, arr) =>
<li className={`breadcrumb-item ${i === arr.length - 1 ? 'active' : ''}`}><a
href={APP_CONTEXT + e.url}>{e.name}</a>/</li>
)}
</ol>
</nav>
}
}
class BreadcrumbsTypes extends BreadcrumbsHome {
getBreadcrumbs = () => [
...super.getBreadcrumbs(),
...this.props.path
]
as i read about this problem. Seems to be tied with babel so i tried adding the //noprotect line
I would like to handle with ES6 and avoid such way
ParentClass.prototype.myMethod.call(this, arg1, arg2, ..)
Any ideas to fix that?


