-
-
Notifications
You must be signed in to change notification settings - Fork 622
Description
I've been jumping through a lot of hoops to pass an accurate contentWidth
. In code review I'm usually finding that other developers aren't bothering. Their results seem to render just fine in most cases.
In the case I'm looking at right now, for example, the developer has suppressed the "you need to pass contentWidth" warning by just passing useWindowDimensions().width
. I see the text wrapping exactly where it's supposed to (to my eye at least), even though the real amount of width available for this HTML is significantly less than that. If it were really only trying to wrap after the passed width, it would be overflowing the viewport, and it's not.
So if I tell the other developer "this is no good; pass the correct width", they'll point to it and say "it works fine, look".
So when exactly does it matter to pass the exact correct width?