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
type VersionChar = | |
| '1' | '2' | '3' | '4' | '5'; | |
type Char = | |
| '0' | '1' | '2' | '3' | |
| '4' | '5' | '6' | '7' | |
| '8' | '9' | 'a' | 'b' | |
| 'c' | 'd' | 'e' | 'f'; | |
type Prev<X extends number> = |
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 { pipe } from 'fp-ts/function'; | |
import { lens } from 'monocle-ts'; | |
import { memo, useLayoutEffect, useRef, useState } from 'react'; | |
import { LayoutChangeEvent, Text, View } from 'react-native'; | |
import { useTheme } from '../contexts/ThemeContext'; | |
const isOverflown = ({ | |
clientWidth, | |
clientHeight, | |
scrollWidth, |
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 type * as Stitches from '@stitches/react'; | |
import { css, config } from "./stitches.config"; | |
type TCSS = Stitches.CSS<typeof config>; | |
const { space } = config.theme; | |
type TSpaceKey = keyof typeof space; | |
const gap = (Object.keys(space) as Array<TSpaceKey>).reduce< | |
Record<TSpaceKey, TCSS> |
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 { ColorSchemeName, Platform, StyleSheet, ViewStyle } from 'react-native'; | |
// AFAIK, Android has a problem with negative margins. | |
type RhythmSize = 'XXS' | 'XS' | 'Sm' | '' | 'Lg' | 'XL' | 'XXL'; | |
type RhythmProp = | |
| `${ | |
| 'm' | |
| 'p' | |
| `${'m' | 'p'}${'l' | 'r' | 't' | 'b' | 'v' | 'h'}`}${RhythmSize}` | |
| `${'w' | 'h' | `${'max' | 'min'}${'W' | 'H'}`}${RhythmSize}` |
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 * as React from 'react'; | |
import { render } from 'react-native-testing-library'; | |
import { Provider } from 'react-redux'; | |
import { createStore } from 'redux'; | |
import { MyContainerComponent, MyPresentationalComponent } from '...'; | |
// Create a real redux store, with your reducers and middleware, and a useful initial | |
// state tree... | |
const store = createStore(...); |
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
- name: Restore yarn workspaces | |
id: yarn-cache | |
uses: actions/cache@master | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' |
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 com.facebook.react.modules.network.OkHttpClientProvider; | |
+ import okhttp3.OkHttpClient; | |
+ import okhttp3.brotli.BrotliInterceptor; | |
... | |
public void onCreate() { | |
super.onCreate(); | |
+ OkHttpClientProvider.setOkHttpClientFactory(() -> { |
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 * as React from 'react'; | |
import { | |
EmitterSubscription, | |
Keyboard, | |
KeyboardEvent, | |
LayoutAnimation, | |
Platform, | |
Dimensions, | |
ScreenRect, | |
} 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
const express = require('express'); | |
const app = express(); | |
// Application | |
app.get('/', function(req, res) { | |
if (process.env.NODE_ENV === 'development') { | |
for (var key in require.cache) { | |
delete require.cache[key]; | |
} | |
} |