concept justifycontent in category react native

appears as: justifyContent, justifyContent
React Native in Action

This is an excerpt from Manning's book React Native in Action.

You’ve already seen flexbox used in many of the examples. It’s powerful and makes laying out items so much easier than alternative methods that it’s difficult not to use it. You’ll benefit greatly by taking time to understand the material in this section. Here are the alignment properties used to control the flexbox layout: flex, flexDirection, justifyContent, alignItems, alignSelf, and flexWrap.

Listing 5.7 Examples showing the justifyContent options
...
render() {
  return (
    <View style={styles.container}>
      <FlexContainer style={[{justifyContent: 'center'}]}>    #1  
        <Example>center</Example>
        <Example>center</Example>
      </FlexContainer>
      <FlexContainer style={[{justifyContent: 'flex-start'}]}>    #2  
        <Example>flex-start</Example>
        <Example>flex-start</Example>
      </FlexContainer>
      <FlexContainer style={[{justifyContent: 'flex-end'}]}>    #3  
        <Example>flex-end</Example>
        <Example>flex-end</Example>
      </FlexContainer>
      <FlexContainer style={[{justifyContent: 'space-around'}]}>    #4  
        <Example>space-around</Example>
        <Example>space-around</Example>
      </FlexContainer>
      <FlexContainer style={[{justifyContent: 'space-between'}]}>    #5  
        <Example>space-between</Example>
        <Example>space-between</Example>
      </FlexContainer>
    </View>
  );
}
...

#1   Uses the justifyContent: 'center' option
#2   Uses the justifyContent: 'flex-start' option
#3   Uses the justifyContent: 'flex-end' option
#4   Uses the justifyContent: 'space-around' option
#5   Uses the justifyContent: 'space-between' option


!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":4,\"ch\":29},{\"line\":4,\"ch\":55}],[{\"line\":8,\"ch\":29},{\"line\":8,\"ch\":59}],[{\"line\":12,\"ch\":29},{\"line\":12,\"ch\":57}],[{\"line\":16,\"ch\":29},{\"line\":16,\"ch\":61}],[{\"line\":20,\"ch\":29},{\"line\":20,\"ch\":62}]]"}
!@%STYLE%@!