Skip to content

Commit 4293364

Browse files
authored
Fix FlexShrink default value
On react-native flexShrink default value is not 1 but 0. 1 is the default value for the web and this can be confusing.
1 parent a402908 commit 4293364

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/versioned_docs/version-0.63/flexbox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ When wrapping lines, `alignContent` can be used to specify how the lines are pla
189189

190190
- [`flexShrink`](layout-props#flexshrink) describes how to shrink children along the main axis in the case in which the total size of the children overflows the size of the container on the main axis. `flexShrink` is very similar to `flexGrow` and can be thought of in the same way if any overflowing size is considered to be negative remaining space. These two properties also work well together by allowing children to grow and shrink as needed.
191191

192-
`flexShrink` accepts any floating point value >= 0, with 1 being the default value. A container will shrink its children weighted by the children’s `flexShrink` values.
192+
`flexShrink` accepts any floating point value >= 0, with 0 being the default value (on the web, the default is 1). A container will shrink its children weighted by the children’s `flexShrink` values.
193193

194194
- [`flexBasis`](layout-props#flexbasis) is an axis-independent way of providing the default size of an item along the main axis. Setting the `flexBasis` of a child is similar to setting the `width` of that child if its parent is a container with `flexDirection: row` or setting the `height` of a child if its parent is a container with `flexDirection: column`. The `flexBasis` of an item is the default size of that item, the size of the item before any `flexGrow` and `flexShrink` calculations are performed.
195195

0 commit comments

Comments
 (0)