How to get this class inside a class method without resorting to bind? Because this method needs your this.
For example:
export default class test extends Component { constructor() { this.state = { loaded: false }; } getParentThis() { //Принимает из вне элемент, к которому мы можем обратиться через this, но так же нам нужно свойство loaded console.log(this.state); //Если не сделать bind в вызове функции, показывает undefined, но если сделать, теряется переданный элемент } }
this- Nick