nelsonprsousa
Follow
Working from home
Senior Software Engineer @Farfetch
-
Farfetch
- Remote across Europe
- @nelsonprsousa
- in/nelsonprsousa
Pinned Loading
-
Useful to avoid multiple requests to...
Useful to avoid multiple requests to the same Task<T> (e.g. an HTTP GET operation). You probably want to registered the loader as a scoped or singleton service. Bare in mind that GetOrAdd is *not* atomic, although you can use your loader safely since it is thread-safe (usage of Lazy<Task<T>> to avoid multiple operations to resolve Task<T>). 1public abstract class BaseLoader<T> : IBaseLoader<T>
2where T : class
3{
4private readonly ConcurrentDictionary<string, Lazy<Task<T?>>> cache = new();
5 -
The expected native behavior of scro...
The expected native behavior of scrollable components is to respond to events from navigation that will scroll to top when tapping on the active tab as you would expect from native tab bars. Works with react-native-navigation. 1import { useEffect, useRef } from 'react';
2import { ScrollView } from 'react-native';
3import { Navigation } from 'react-native-navigation';
45const useScrollToTop = ({
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.