Lets install react-native-deck-swiper to be sure the cards bring swiped like Tinder
Displays
Now that the navigation is actually cared for, we can begin working throughout the format.
Were likely to be utilizing a UI toolkit called React Native items, so go on and do the installation:
Before starting anything, remember to duplicate the possessions/ index from the GitHub repo entirely for dummy files.
Now well start working throughout the room display screen.
Room Screen
Before starting to be effective on HomeScreen.js , allows delete needless documents. Go directly to the hardware/ folder and delete StyledText.js and the __tests__ folder.
Now allows start working on our very own homes monitor.
First of all, establish Card.js inside the elements/ folder. Comprise attending display a visibility card making use of the individuals term, what their age is and exactly how a distance they stay.
Are attending make use of a Tile aspect from react-native-elements to produce the consumer cards.
The Tile element has many extra homes. activeOpacity is actually a number passed to control opacity on pressing the Tile, and that is recommended, nevertheless the default importance is actually 0.2, making it appear clear on press, therefore we go a value close to 1 to keep it opaque. The showcased prop improvement the appearance of Tile . They keeps the text in title and a caption prop on graphics versus below whenever included just isn’t given or perhaps is set to bogus .
The others were types applied to get the consumer card appropriate. The bin preferences focuses the user cards. imageContainer has a width and a height. The width is defined towards complete width regarding the device30dp (tool pixels)and the level is set to the total top regarding the unit BOTTOM_BAR_HEIGHT * 6 .
Let us install react-native-deck-swiper to be sure our very own cards become swiped like Tinder. Read more