RiotTS
RiotTS copied to clipboard
Classes properties in nested riot tags
In nested tags have to use parent.parent ...., to access the class properties. How to solve this problem?

Thank you
this is an unsolved Riot (not RiotTS) problem we friendly call it "parent.parent hell". It's because Riot changes the evaluation context when there is a nested tag. No other template engine works this way (angular, react-templates etc), the general approach is to maintain one evaluation context per tag definition.
I once proposed a solution but it was not merged. See also https://github.com/riot/riot/issues/972
when i use javascript with riot-loader, it works well
"riotjs-loader": "^3.0.0",
"riot": "^2.6.1",