Use basis/grow/shrink over width/height when flex involved
con1: width, height when used on flex items work ok, but may create unintentional bugs.
con2: unnecessary cognitive load of dealing with 2 extra params, i.e. how width/height will be converted to basis/grow/shrink
con3: compromises the flexibility of items and the container, i.e. the whole point of flex.
pro1: setting width, height ensures fixed dimensions, which is useful for icons, especially when they're not SVG.
I prefer to use flex params for flex stuff, will keep doing so.
Makes styling consistent with React Native as well, as flex is a primary construct there.
This is recommended way too (cite?)
note: Using width/height on container is fine, of course.
Use basis/grow/shrink over width/height when flex involved
con1: width, height when used on flex items work ok, but may create unintentional bugs.
con2: unnecessary cognitive load of dealing with 2 extra params, i.e. how width/height will be converted to basis/grow/shrink
con3: compromises the flexibility of items and the container, i.e. the whole point of flex.
pro1: setting width, height ensures fixed dimensions, which is useful for icons, especially when they're not SVG.
I prefer to use flex params for flex stuff, will keep doing so. Makes styling consistent with React Native as well, as flex is a primary construct there. This is recommended way too (cite?)
note: Using width/height on container is fine, of course.