Skip to content

Instantly share code, notes, and snippets.

View a-eid's full-sized avatar
🎯
Focusing

Ahmed Eid a-eid

🎯
Focusing
View GitHub Profile
import * as React from 'react';
import { StyleSheet } from 'react-native';
import { gestureHandlerRootHOC, TouchableWithoutFeedback } from 'react-native-gesture-handler';
import A, { useAnimatedProps, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
import { colors, container, screenWidth } from 'src/theme';
import { Box } from '../Box';
import { Text } from '../Text';
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
# Set new panes to open in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
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>
import {useComputed, Signal} from '@preact/signals-react'
import {ReactNode} from 'react'
type SignalConsumerProps<Signal, Selection> = {
signal: Signal
children: (value: Selection) => ReactNode
selector: (s: Signal) => Selection
}
export function ComputedSignalConsumer<Signal, Selection>({
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
# Set new panes to open in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
# Set new panes to open in current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"