Closed nicketson closed 2 years ago
Interesting because it looks like that commit was very intentional to fix a different issue. Trying to track down that issue now, but it is proving elusive.
Isn't the issue that the getters are using the current scope instead of the parent? related https://github.com/ryansolid/mobx-jsx/issues/44 curious enough, at the time I sent that issue, it only happens when you double nest a custom component, it doesn't happen if you double nest a regular div.
The issue can be seen here
The expression
this.shouldStay
here https://github.com/ryansolid/dom-expressions/blob/12fb07c130cf1a5c458bcd11260f9a8ed012f2a9/packages/babel-plugin-jsx-dom-expressions/test/__dom_fixtures__/components/code.js#L120should be transformed into
_self$.shouldStay
here https://github.com/ryansolid/dom-expressions/blob/12fb07c130cf1a5c458bcd11260f9a8ed012f2a9/packages/babel-plugin-jsx-dom-expressions/test/__dom_fixtures__/components/output.js#L360this
is going to refer to the object literal being passed as the second argument to_$createComponent()
instead of thethis
in therender
function, which is what would be expected.The bug was introduced in commit https://github.com/ryansolid/dom-expressions/commit/f8ea5cce69b18249f1f545a5827b50b98cac6440