Posts

Showing posts from March, 2021
  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 . ...
  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

  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...