Config setupusing scripts but not via the native scheme setup
This file contains hidden or 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 { useState, useEffect, useMemo } from 'react'; | |
// Helper function to get nested value from object by dot notation | |
const getValueByPath = (obj: any, path: string): any => { | |
return path.split('.').reduce((acc, key) => acc?.[key], obj); | |
}; | |
/** | |
* Returns a filtered dataset and a function to update the main data source. | |
* |
This file contains hidden or 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, { FC, memo, ReactNode, useEffect } from 'react'; | |
import { StyleProp, StyleSheet, Text, TextStyle, TouchableOpacity, View, ViewStyle } from 'react-native'; | |
import Animated, { | |
Extrapolation, | |
interpolate, | |
measure, | |
runOnUI, | |
useAnimatedRef, | |
useAnimatedStyle, | |
useDerivedValue, |
This file contains hidden or 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, { memo, useCallback } from 'react'; | |
import { | |
ActivityIndicator, | |
ImageResizeMode, | |
ImageSourcePropType, | |
ImageStyle, | |
StyleProp, | |
StyleSheet, | |
View, | |
} from 'react-native'; |
This file contains hidden or 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
/* | |
ArrayUtil exposes a set of helper methods for working with | |
ReadableArray (by React Native), Object[], and JSONArray. | |
*/ | |
package com.iodine.start; | |
import com.facebook.react.bridge.Arguments; | |
import com.facebook.react.bridge.ReadableArray; |
This file contains hidden or 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 useDebounce = (value, delay) => { | |
const [debouncedValue, setDebouncedValue] = useState(value); | |
useEffect(() => { | |
const handler = setTimeout(() => { | |
setDebouncedValue(value); | |
}, delay); | |
return () => { | |
clearTimeout(handler); |
This file contains hidden or 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
// --------------- LIBRARIES --------------- | |
import React, { memo } from 'react'; | |
import { View, Animated, StyleSheet, Easing, PanResponder } from 'react-native'; | |
// --------------- ASSETS --------------- | |
export const TRACK_HEIGHT = 32; | |
export const HOR_PAD = 10; | |
const Colors = { |
This file contains hidden or 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
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
NewerOlder