- React Native still has the concept of
style inheritance
, but limited totext subtrees
. - All dimensions in React Native are
unitless
, and representdensity-independent pixels
. - If a parent does not have either
a fixed width
andheight
orflex
, the parent will have dimensions of 0 and theflex
children will not be visible. - the
flex
parameter only supporting a single number. - For
stretch
to have an effect, children must not havea fixed dimension
alongthe secondary axis
. - Pressing the button will call the
"onPress"
function. - The
ScrollView
works best to present a small amount of things of a limited size. All the elements and views of aScrollView
are rendered, even if they are not currently shown on the screen. If you have a long list of more items than can fit on the screen, you should use aFlatList
instead.
网友评论