When to use Stack #2446
Answered
by
TheSisb
alisontanu
asked this question in
Q&A
When to use Stack
#2446
-
Beta Was this translation helpful? Give feedback.
Answered by
TheSisb
Jun 6, 2022
Replies: 1 comment 1 reply
-
Hi @alisontanu, Good question! You can replace a few of these |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TheSisb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @alisontanu,
Good question! You can replace a few of these
Stacks
with aBox marginBottom="space30"
if you know you're spacing only two items apart. Stack becomes more useful for 3 or more. Reading aBox
in the JSX is more straightforward than aStack
because a stack sets up the expectation that "several things nested in here are spaced apart" while a Box is just mindful of itself.You can also consider using
Paragraph
instead ofText as="p"
. Hope this helps!