From 7c89cf37c6378ebde7db0c0960803500dc57445e Mon Sep 17 00:00:00 2001 From: linh-le Date: Mon, 9 Oct 2017 21:58:43 -0700 Subject: [PATCH] Change attribute mentioned in alignItem Summary: Since alignItem works on the secondary axis, in the example, the value heigth: 50 should be deleted so that alignItem: 'stretch' can work. Not width: 50. In fact, width needs to be there, or else no component will be shown at all. (Write your motivation here.) I'm going through the docs, that's why I found this. It's already tested! Apologize if I'm contributing the wrong way. I read the instructions, but this is my first time ever, and will try to do it again correctly if needed. Closes https://github.com/facebook/react-native/pull/16109 Differential Revision: D6017969 Pulled By: shergin fbshipit-source-id: af37b831f1bb6206dabdaff36d4cb9e88fb1a496 --- docs/LayoutWithFlexbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/LayoutWithFlexbox.md b/docs/LayoutWithFlexbox.md index d3e70d33be86f2..f58feb6dddcd0d 100644 --- a/docs/LayoutWithFlexbox.md +++ b/docs/LayoutWithFlexbox.md @@ -73,7 +73,7 @@ AppRegistry.registerComponent('AwesomeProject', () => JustifyContentBasics); Adding `alignItems` to a component's style determines the **alignment** of children along the **secondary axis** (if the primary axis is `row`, then the secondary is `column`, and vice versa). Should children be aligned at the start, the center, the end, or stretched to fill? Available options are `flex-start`, `center`, `flex-end`, and `stretch`. -> For `stretch` to have an effect, children must not have a fixed dimension along the secondary axis. In the following example, setting `alignItems: stretch` does nothing until the `width: 50` is removed from the children. +> For `stretch` to have an effect, children must not have a fixed dimension along the secondary axis. In the following example, setting `alignItems: stretch` does nothing until the `height: 50` is removed from the children. ```ReactNativeWebPlayer import React, { Component } from 'react';