Closed titoBouzout closed 9 months ago
I was trying to use this on a function given to props. It gets changed to _self$. Possibly this has to do with component classes from mobx-jsx?
this
function Component() { return ( <div prop:update={function () { console.log(this); }.bind({ one: true })} /> ); }
compiles to:
function Component() { const _self$ = this; return (() => { const _el$ = _tmpl$(); _$effect(() => _el$.update = function () { console.log(_self$); }.bind({ one: true })); return _el$; })(); }
Playground: https://playground.solidjs.com/anonymous/393c3426-bea9-4d4c-8af9-5cc28d451a47
fixed in https://github.com/ryansolid/dom-expressions/commit/5b7b53d2ecb1c4fea679fbae6d165451fb5c3393
I was trying to use
this
on a function given to props. It gets changed to _self$. Possibly this has to do with component classes from mobx-jsx?compiles to:
Playground: https://playground.solidjs.com/anonymous/393c3426-bea9-4d4c-8af9-5cc28d451a47