Top "This" questions

Keyword that refers to the current class instance or object in many object-oriented programming languages.

React: this is null in event handler

I have a LoginForm component. I want to check before submit, that both loginName and password is set. I tried …

javascript reactjs this
Passing "this" to a function from within a constructor?

Can I pass "this" to a function as a pointer, from within the class constructor, and use it to point …

c++ constructor this
Call static method from instance in PHP, future deprecation?

While I understand the $this variable is not available when a method is called in a static context, to assist …

php this static-methods deprecated instance-methods
Can't get $(this) working in jQueryUI autocomplete

I'm trying to create a generic autocomplete script using jQueryUI. The autocomplete should work for every: <input type='text' …

jquery jquery-ui autocomplete this
PHP copy all object properties to this

I have an object in PHP, of the type MyObject. $myObject instanceof MyObject Now, in the class MyObject, there is …

php properties this assign
What's the difference between this and Activity.this

For example Intent intent = new Intent(this, SecondActivity.class); eclipse error: The method setClass(Context, Class) in the type Intent …

java android syntax android-activity this
TypeError: "this..." is not a function

I define hostService as follows. The senario is I call first hostService.addListener() in the controller, then the controller may …

javascript angularjs this angularjs-rootscope
What does "this" refer to in arrow functions in ES6?

I've read in several places that the key difference is that this is lexically bound in arrow functions. That's all …

javascript this ecmascript-6 arrow-functions
Arrow Functions and This

I'm trying out ES6 and want to include a property inside my function like so var person = { name: "jason", shout: () =&…

javascript this ecmascript-6 arrow-functions
Functional Components inside class components

Currently I have a class component that contains functions that act as components in my JSX. Example: class MyComponent extends …

javascript reactjs components this react-props