This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const user = { | |
name: "Daniel", | |
age: 26, | |
}; | |
user.location; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => ( | |
<SafeAreaView style={styles.container}> | |
<View> | |
<Text style={styles.title}> | |
The title and onPress handler are required. It is recommended to set accessibilityLabel to help make your app usable by everyone. | |
</Text> | |
<Button | |
title="Press me" | |
onPress={() => Alert.alert('Simple Button pressed')} | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
// Check that you have the following line (if not, add it): | |
google() // Google's Maven repository | |
} | |
dependencies { | |
... | |
// Add this line | |
classpath 'com.google.gms:google-services:4.3.4' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useRef} from 'react'; | |
import { | |
Dimensions, | |
StyleSheet, | |
Text, | |
TextInput, | |
TouchableOpacity, | |
View, | |
} from 'react-native'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useRef} from 'react'; | |
... | |
const inputRef = useRef<any>(null); | |
... | |
const onFocus = ()=>{ | |
InputLength.value = {width: '90%'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Animated, { useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; | |
... | |
return ( | |
<View style={styles.searchTopContainer}> | |
{/* Added InputLengthStyles animated styles */} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; | |
... | |
const InputLengthStyles = useAnimatedStyle(() => | |
return { | |
width: withTiming(InputLength.value.width, { | |
duration: 250, | |
}), | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useSharedValue } from 'react-native-reanimated'; | |
... | |
const CustomTextInput = () => { | |
const InputLength = useSharedValue({width: '100%'}); | |
const SearchTextPlacement = useSharedValue({ | |
transformX: (Dimensions.get('window').width - 140) / 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
TextInput, | |
TouchableOpacity, | |
View, | |
} from 'react-native'; | |
import Icon from 'react-native-vector-icons/Ionicons'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Button,View} from 'react-native'; | |
import Animated, { useSharedValue, useAnimatedStyle } from 'react-native-reanimated'; | |
function App() { | |
const sharedValue = useSharedValue(0); | |
const boxStyle = useAnimatedStyle(() => { | |
return { | |
width: 100, |
NewerOlder