import React , { Component , useEffect } from 'react' ; import { AsyncStorage } from 'react-native' ; import { useIsFocused } from "@react-navigation/native" ; import { Card, Icon} from 'react-native-elements' import PouchDB from 'pouchdb-react-native' import {TouchableOpacity, View, FlatList, StyleSheet, Text, StatusBar, Dimensions, Image, Alert} from 'react-native' ; //------Deside how many grid Display in main Activity---- var db = PouchDB ( 'todo' ); export default function MainActivity ( { navigation , route , props} ) { const isFocused = useIsFocused (); //----define State---- const [id, setId] = React . ...
Posts
- Get link
- X
- Other Apps
import React , { Component , useEffect } from 'react' ; import { AsyncStorage } from 'react-native' ; import { useIsFocused } from "@react-navigation/native" ; import { Card, Icon} from 'react-native-elements' import PouchDB from 'pouchdb-react-native' import {TouchableOpacity, View, FlatList, StyleSheet, Text, StatusBar, Dimensions, Image, Alert} from 'react-native' ; //------Deside how many grid Display in main Activity---- const numColumns = 1 ; const WIDTH = Dimensions . get ( 'window' ) . width var db = PouchDB ( 'todo' ); export default function MainActivity ( { navigation , route , props} ) { const isF...
CreatePostScreen
- Get link
- X
- Other Apps
CreatePostScreen import * as React from ' react ' ; import { View, Text, Button,TextInput } from ' react-native ' ; import { NavigationContainer } from ' @react-navigation/native ' ; import { createStackNavigator } from ' @react-navigation/stack ' ; function CreatePostScreen ({ navigation , route }) { const [id, setId] = React. useState ( '' ); const [name, setName] = React. useState ( '' ); const [postText, setPostText] = React. useState ( '' ); return ( <> < TextInput multiline placeholder = " Your id: " style ={ { height : 50 , padding : 10 , backgroundColor : ' white ' } } value ={ id } onChangeText ={ setId } /> < TextInput multiline placeholder = " Your Name: " style ={ { height : 50 , padding : 10 , backgroundColor : ' white...
Show Image Second Screen with id in Flatlist
- Get link
- X
- Other Apps
App.js // In App.js in a new project import * as React from ' react ' ; import { NavigationContainer } from ' @react-navigation/native ' ; import { createStackNavigator } from ' @react-navigation/stack ' ; import HomeScreen from " ./HomeScreen " ; import DetailsScreen from " ./DetailsScreen " ; import CreatePostScreen from " ./CreatePostScreen " ; import RecyclerList from " ./RecyclerView " ; const Stack = createStackNavigator (); function App () { return ( < NavigationContainer > < Stack.Navigator > < Stack.Screen name = " Home " component ={ HomeScreen } /> < Stack.Screen name = " Details " component ={ DetailsScreen } /> < Stack.Screen name = " CreatePostScreen " component ={ CreatePostScreen } /> < Stack.Screen name = " RecyclerList " component ={ RecyclerList } /> </...