Allow mixin to reads from global variables #107
Replies: 3 comments
-
Thanks for requesting this. |
Beta Was this translation helpful? Give feedback.
-
I made some tests with this idea, but it was not feasible due to the mixins evaluated before templates. This means that the values in For now I will close this, but the idea will be considered in future engine implementations 👍 An alternative (althought a little cumbsersome) is using an external template engine in server rendering jsons. That could help but requires a dynamic server language like php, python or js and a server. Thanks for sharing your idea it was helpful to understand better how mixins works 🥇 |
Beta Was this translation helpful? Give feedback.
-
Sure, thank you for the attention anyway! I currently use integromat to do the adaptation of flows for me, but it won't be feasible at scale. Just out of curiosity and for future consideration too, is it possible to estimate what would it take in development effort to have a kind of variable that can be read by the mixins? |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
Currently mixins cannot read from variables, they only work if the url is statically written.
For example this does not works:
Describe the solution you'd like
Would be great to load from not-previously specified URLs.
For example in one view I make a network request to an API endpoint, then from that endpoint I get an URL as a response.
Then I'd write that URL to a global variable and href / move to another view and in that view the only code would be
That way we'd have a fully dynamic app, completely controlled by an endpoint, instead of having to build apps every time a link changes.
Describe alternatives you've considered
I'm using third party tooling to solve this, but it only increases costs and makes the whole flow more clumsy.
Identify which component would benefit from this feature
Additional context
None for now.
Beta Was this translation helpful? Give feedback.
All reactions