What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-01 06:25:09
getting view height dynamically in react native
import React, { Component } from 'react'; import ReactNative, { AppRegistry, View, TouchableOpacity, findNodeHandle, Text, StyleSheet } from 'react-native'; export default class App extends Component { constructor() { super(); this.state = {... Add solution -
Javascript 2022-02-15 22:50:04
react native spinkit
import React from 'react'; import { View, ActivityIndicator } from "react-native"; const MyActivityIndicator = () => { return ( <View style={{ flex: 1, justifyContent: "center"}}> //size can be "small&quo... Add solution -
Javascript 2022-02-10 02:05:02
reactnaviataion change title
import * as React from 'react'; import { View, Text, Button } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; function HomeScreen({ navigation }) { ret... Add solution -
Javascript 2022-01-30 19:45:43
react native activity
import React from 'react'; import { View, ActivityIndicator } from "react-native"; const MyActivityIndicator = () => { return ( <View style={{ flex: 1, justifyContent: "center"}}> //size can be "small&quo... Add solution -
Javascript 2022-01-30 18:26:30
touchableopacity as button in react native
//React Native Button element doesn't have style props and offers very //few customization. Use TochableXXX elements instead. //TouchableOpacity works fine import { TouchableOpacity, Text, } from "react-native"; <TouchableOpacity ... Add solution -
Javascript 2021-11-21 15:46:24
react native passing parameters to routes
Copy function HomeScreen({ navigation }) { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <Text>Home Screen</Text> <Button title="Go to Details" onPress=... Add solution -
TypeScript 2021-11-21 13:33:07
refreshcontrol
import React from 'react'; import { RefreshControl, SafeAreaView, ScrollView, StyleSheet, Text } from 'react-native'; const wait = (timeout) => { return new Promise(resolve => setTimeout(resolve, timeout)); } const App = () => { const [refr... Add solution -
Javascript 2021-11-16 09:26:47
space between react native
justifyContent: 'space-between', Add solution