In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and
returning the cached result when the same
inputs occur again.
— wikipedia
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, {useCallback, useEffect, useState} from 'react'; | |
import {Image, StyleSheet, Text, View, TouchableOpacity} from 'react-native'; | |
import {initStripe, useStripe} from '@stripe/stripe-react-native'; | |
import {COMPANY} from '@env'; | |
import {colors} from './colors'; | |
import Button from './button'; | |
import {getPaymentIntent, getPublishableKey} from './stripeHelper'; | |
import {AccountSettingsHelpers} from '../setting'; | |
import {RootNavigation} from '../navigation/RootNavigation'; |
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 from 'react'; | |
import {useWindowDimensions} from 'react-native'; | |
import {TabBar, SceneMap} from 'react-native-tab-view'; | |
import {HScrollView} from 'react-native-head-tab-view'; | |
import {CollapsibleHeaderTabView} from 'react-native-tab-view-collapsible-header'; | |
import Feeds from './feeds'; | |
import SocialProfileHeader from './profileHeader'; | |
const FirstRoute = () => ( | |
<HScrollView index={0}> |
#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6
Paragraph
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, {useCallback, useMemo} from 'react'; | |
import {View} from 'react-native'; | |
import {OptimizedHeavyScreen} from 'react-navigation-heavy-screen'; | |
import {toJS} from 'mobx'; | |
import {observer} from 'mobx-react-lite'; | |
import {ViewabilityTrackerFlatlist} from './viewabilityTracker/viewability-tracker-flashist'; | |
import {useChatStore} from '../store/chatStoreProvider'; | |
import {UserContextProvider} from '../../user/userHook'; | |
import {useMessagesRenderHook} from './messagesRenderHook'; | |
import {generateMessages} from './messageBrainer'; |
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 { createContext, forwardRef, useCallback, useMemo } from "react"; | |
import { FlatList, FlatListProps, ViewToken } from "react-native"; | |
import Animated, { useSharedValue } from "react-native-reanimated"; | |
const MAX_VIEWABLE_ITEMS = 4; | |
type ViewabilityItemsContextType = string[]; | |
export const ViewabilityItemsContext = createContext< | |
Animated.SharedValue<ViewabilityItemsContextType> |
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, {useMemo, useRef, useState} from 'react'; | |
import {replaceMentionValues} from 'react-native-controlled-mentions'; | |
import {useChatStore} from '../store/chatStoreProvider'; | |
const giveMessage = message => { | |
var noMessage = message === undefined || message === null || message === ''; | |
return noMessage === true | |
? undefined | |
: replaceMentionValues(message, value => value.original); |
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
// Expo SDK41 | |
// expo-blur: ~9.0.3 | |
import React, { useRef } from 'react'; | |
import { | |
Animated, | |
Image, | |
ImageBackground, | |
ScrollView, | |
StatusBar, |