DEV Community

Discussion on: From classes to plain objects and pure functions

Collapse
 
smalluban profile image
Dominik Lubański

The change is simple. You can think of this keyword as a different type of argument of the function. Instead of using it, we can expand the arguments list by passing the context (in actual getter/setter property definition) as the first argument (shifting rest of them).

If you want to know more, I recommend to see the implementation in the library. For example here: github.com/hybridsjs/hybrids/blob/...