From b03a9c4e844a57d8f0ef5ceb62f98548a6b81537 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Fri, 8 Dec 2017 00:06:31 +0000 Subject: [PATCH] Deploy website Deploy website version based on 0dc2f4e12bc52f35cc27b7a014d7866ba8a1b070 --- docs/next/height-and-width.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/next/height-and-width.html b/docs/next/height-and-width.html index 64a7f56fd98..2a764096042 100644 --- a/docs/next/height-and-width.html +++ b/docs/next/height-and-width.html @@ -5,7 +5,7 @@ nav.classList.toggle('docsSliderActive'); };
Edit

Height and Width

A component's height and width determine its size on the screen.

-

Fixed Dimensions

+

Fixed Dimensions

The simplest way to set the dimensions of a component is by adding a fixed width and height to style. All dimensions in React Native are unitless, and represent density-independent pixels.

import React, { Component } from 'react';
 import { AppRegistry, View } from 'react-native';
@@ -27,7 +27,7 @@ AppRegistry.registerComponent('AwesomeProject', () => FixedDimensionsBasics);
 

Setting dimensions this way is common for components that should always render at exactly the same size, regardless of screen dimensions.

-

Flex Dimensions

+

Flex Dimensions

Use flex in a component's style to have the component expand and shrink dynamically based on available space. Normally you will use flex: 1, which tells a component to fill all available space, shared evenly amongst each other component with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.

A component can only expand to fill available space if its parent has dimensions greater than 0. If a parent does not have either a fixed width and height or flex, the parent will have dimensions of 0 and the flex children will not be visible.