Skip to content

Instantly share code, notes, and snippets.

@dungkaka
dungkaka / gist:3b622e58fc3047a46118823f856bf2ef
Last active March 13, 2023 06:58
Expo push notification !
import { showToast } from "@common-ui/ToastNotify/ToastManager";
import { useNavigation } from "@react-navigation/native";
import { CHATFROM } from "constant/chat";
import { NAVIGATION } from "constant/navigation";
import * as Notifications from "expo-notifications";
import { useEffect } from "react";
import { Platform } from "react-native";
import * as Device from "expo-device";
/* Hàm dùng để lắng nghe dữ liệu nhận được từ push notification khi click vào
@dungkaka
dungkaka / flatlist wheel picker
Last active May 17, 2023 13:03
Wheel picker using Flatlist
import React, { Fragment } from "react";
import { FlatList, StyleSheet, Text, View, Dimensions } from "react-native";
import Animated, {
Extrapolate,
interpolate,
useAnimatedScrollHandler,
useAnimatedStyle,
useDerivedValue,
useSharedValue,
} from "react-native-reanimated";
@dungkaka
dungkaka / picker
Last active September 4, 2024 08:57
Convert wheel picker to reanimated 2
import React from "react";
import { Dimensions, StyleSheet, Text, View } from "react-native";
import { PanGestureHandler } from "react-native-gesture-handler";
import Animated, {
Easing,
Extrapolate,
interpolate,
useAnimatedGestureHandler,
useAnimatedReaction,
useAnimatedStyle,