Using Layers Dynamically vs. Passing as Arguments

Question:

Is this a bad usecase for a layer?

I find this "pattern" repeating, where I'd like to have a layer, but I need to construct it dynamically.

I could instead not use layers at all, and just pass it as arg:
image.png
Was this page helpful?