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 { DependencyList, useMemo } from "react"; | |
| import { | |
| ImageStyle, | |
| RegisteredStyle, | |
| StyleProp, | |
| StyleSheet, | |
| TextStyle, | |
| ViewStyle, | |
| } 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
| import { forEachObjIndexed } from "ramda"; | |
| import * as React from "react"; | |
| import { | |
| Animated, | |
| ScrollView, | |
| View, | |
| ViewStyle, | |
| LayoutChangeEvent, | |
| NativeScrollEvent, | |
| } 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
| diff --git a/node_modules/lottie-react-native/lottie-react-native.podspec b/node_modules/lottie-react-native/lottie-react-native.podspec | |
| index 006d118..63caf4a 100644 | |
| --- a/node_modules/lottie-react-native/lottie-react-native.podspec | |
| +++ b/node_modules/lottie-react-native/lottie-react-native.podspec | |
| @@ -14,7 +14,11 @@ Pod::Spec.new do |s| | |
| s.source = { :git => "https://github.com/react-community/lottie-react-native.git", :tag => "v#{s.version}" } | |
| s.source_files = "src/ios/**/*.{h,m,swift}" | |
| - s.swift_version = "5.0" | |
| - s.dependency 'React' |
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
| interface StoryView { | |
| onStoryPressed: <TStory extends UserStory | CategoryStory>( | |
| ...args: TStory extends UserStory ? [stories: Story[], selectedStory: UserStory, user: User] : [stories: Story[], selectedStory: CategoryStory] | |
| ) => void; | |
| } |
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
| diff --git a/node_modules/react-native/React/Views/RCTModalHostView.h b/node_modules/react-native/React/Views/RCTModalHostView.h | |
| index 4e61886..2b8b6c0 100644 | |
| --- a/node_modules/react-native/React/Views/RCTModalHostView.h | |
| +++ b/node_modules/react-native/React/Views/RCTModalHostView.h | |
| @@ -17,7 +17,7 @@ | |
| @protocol RCTModalHostViewInteractor; | |
| -@interface RCTModalHostView : UIView <RCTInvalidating> | |
| +@interface RCTModalHostView : UIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate> |
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 { useEffect, useRef } from 'react'; | |
| /** | |
| * Like useEffect but with a custom timeout to debounce an extra function, for example fetch data from a server when the text changes. | |
| * @param shouldExecuteDebounce A function (created with `useCallback`!) which checks whether the `debounceExecute` function should be executed (after it's debounce delay). | |
| * @param debouncedExecute A function (created with `useCallback`!) to run after `{debounceMs}` milliseconds. This function only gets executed, when this hook doesn't re-run within `{debounceMs}` milliseconds after the execution of the `alwaysExecute` function. Note: Because of it's async nature, this function cannot return a cleanup function. | |
| * @param debounceMs The milliseconds to wait until the debounce function gets executed | |
| * @example | |
| * useDebouncedEffect( | |
| * useCallback(() => { |
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
| diff --git a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java | |
| index a9779ad..36726d6 100644 | |
| --- a/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java | |
| +++ b/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.java | |
| @@ -3,6 +3,7 @@ package com.swmansion.rnscreens; | |
| import android.content.Context; | |
| import android.graphics.PorterDuff; | |
| import android.graphics.drawable.Drawable; | |
| +import android.os.Build; | |
| import android.text.TextUtils; |