do I need to pass `App` down to various constructs...
# help
m
do I need to pass
App
down to various constructs (so I can use
logicalPrefixedName
)? is there a way to get the “current”
App
?
t
There's a way to get it, one sec always forget how
scope.node.root
And you can cast that to sst.App
m
maybe it should be a method on stack?
t
Maybe, the thing is if you have nested constructs your scope isn't necessarily the stack
Probably better to provide a static method like
App.of(scope)
m
good point
t
turns out that's already a thing haha
you can use
App.of(scope)
although that might return a weird type from cdk
m
ok thx
is what I’m getting here, it’s a “stage”
t
You might need to cast
App.of
to
<http://sst.App|sst.App>