Answers for "react native div"

1

react native div

// the component for div in react native is "View"
return (
  <View
      style={{
          flexDirection: "row",
          height: 100,
          padding: 20
      }}
  >
      <View style={{ backgroundColor: "blue", flex: 0.3 }} />
      <View style={{ backgroundColor: "red", flex: 0.5 }} />
      <Text>Hello World!</Text>
  </View>
)
Posted by: Guest on July-29-2021

Code answers related to "react native div"

Code answers related to "Javascript"

Browse Popular Code Answers by Language