I am building a fairly simple flow where the user:
clicks a button --> triggers a modal --> clicks Yes/No in that modal --> has some changes applied to their app
However, the code is significantly more convoluted because of the inability to pass components as temporary state variables or additionalScope arguments in Retool.
To compensate, I have resorted to passing a string argument, which then uses if-else logic to specify all the relevant components that need to be read and updated, in essentially what is a makeshift “reference table”. What’s worse, this if-else needs to be duplicated in every subsequent query in the logic (e.g. the query that opens the modal vs the query that applies changes after use hits “Yes” button), because queries then can’t pass these components to the next triggered query either.
I know this is a little hard to understand without looking at my code, but the crux of it is that being able to pass around components as state variables and arguments would make scripting Retool much, much more powerful and maintainable for all kinds of plausible applications such as mine.