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
| 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/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
| 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
| 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
| /** | |
| * Returns a reversed copy of the given Array | |
| */ | |
| export function fastReverse<T>(arr: T[]): T[] { | |
| const result = new Array<T>(arr.length); | |
| for (let i = 0; i < arr.length; i++) { | |
| result[i] = arr[arr.length - 1 - i]; | |
| } | |
| return result; | |
| }; |
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
| // VSCode Settings (hit `Cmd + ,` to open settings) | |
| { | |
| "editor.smoothScrolling": true, | |
| "editor.fontSize": 16, | |
| "editor.fontFamily": "Fira Mono, Consolas, 'Courier New', monospace", | |
| "editor.wordWrap": "on", | |
| "editor.tabCompletion": "on", | |
| "explorer.openEditors.visible": 0, | |
| "explorer.autoReveal": false, |