Skip to content

Instantly share code, notes, and snippets.

View PrasathRavichandran's full-sized avatar
👋
Hi...

Prasath Ravichandran PrasathRavichandran

👋
Hi...
  • Indie Developer
  • Tamilnadu, India.
  • 14:43 (UTC -12:00)
View GitHub Profile
const user = {
name: "Daniel",
age: 26,
};
user.location;
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')}
/>
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'
}
import React, {useRef} from 'react';
import {
Dimensions,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
} from 'react-native';
import React, {useRef} from 'react';
...
const inputRef = useRef<any>(null);
...
const onFocus = ()=>{
InputLength.value = {width: '90%'};
import Animated, { useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated';
...
return (
<View style={styles.searchTopContainer}>
{/* Added InputLengthStyles animated styles */}
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
...
const InputLengthStyles = useAnimatedStyle(() =>
return {
width: withTiming(InputLength.value.width, {
duration: 250,
}),
};
import { useSharedValue } from 'react-native-reanimated';
...
const CustomTextInput = () => {
const InputLength = useSharedValue({width: '100%'});
const SearchTextPlacement = useSharedValue({
transformX: (Dimensions.get('window').width - 140) / 2,
import React from 'react';
import {
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
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,