Text
A React component for displaying text.
<Text>
Text
</Text>
Containers
The <Text>
element is unique relative to layout: everything inside is no longer using the Flexbox layout but using text layout. This means that elements inside of a <Text>
are no longer rectangles, but wrap when they see the end of the line.
Button
A basic button component that should render nicely on any platform. Supports a minimal level of customization.
Different Types of Buttons in React native:
- Button
- TouchableOpacity
- TouchableHighlight
Button
A basic button component that should render nicely on any platform. Supports a minimal level of customization.
TouchableOpacity
A wrapper for making views respond properly to touches. On press down, the opacity of the wrapped view is decreased, dimming it. Opacity is controlled by wrapping the children in an Animated
TouchableHighlight
It is a component that is used to provide a wrapper to Views in order to make them respond correctly to touch-based input. On press down the TouchableHighlight component has its opacity decreased which allows the underlying View or other component's style to get highlighted.
Images in react native:
Importing Images to the app.js
import "name" from "...file location"
using images in the image tag
Import the Image tag in the importing, then open a Image tab inside a View tag then inside the image tag inside the source attribute with the name given in the import.
<Image source={Logo} />
then declare styles using style sheet. So that the image height, width, resize mode, image border,..etc.
Comments