Skip to content

When to use Stack #2446

Answered by TheSisb
alisontanu asked this question in Q&A
Jun 2, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @alisontanu,

Good question! You can replace a few of these Stacks with a Box marginBottom="space30" if you know you're spacing only two items apart. Stack becomes more useful for 3 or more. Reading a Box in the JSX is more straightforward than a Stack 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 of Text as="p". Hope this helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TheSisb
Comment options

Answer selected by TheSisb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants