https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta
Add the following resolutions to your package.json
:
{
"resolutions": {
"@babel/preset-typescript": "^7.21.0",
import { getConfig } from '@expo/config' | |
import fs from 'fs' | |
import spawnAsync from '@expo/spawn-async' | |
import chalk from 'chalk' | |
import path from 'path' | |
const appDir = process.cwd() | |
console.log() | |
console.log(chalk.green('Sentry source maps script. Working directory:')) |
https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta
Add the following resolutions to your package.json
:
{
"resolutions": {
"@babel/preset-typescript": "^7.21.0",
This hook lets you use pagination from URQL. I needed a better solution for React Native and infinite lists.
It also has a pullToRefresh
option. Since URQL's pull to refreshes are so insanely flickery, I decided to fake this completely, and make it pretend to spin for one second (plenty for most calls).
Be sure to use useMemo
with your variables!
It comes with typesafety too.
const document = graphql(`
import * as React from 'react'; | |
import { View, StyleSheet } from 'react-native'; | |
let isEnabled = false; | |
// the following logic comes from the creator of react-native-web | |
// https://gist.github.com/necolas/1c494e44e23eb7f8c5864a2fac66299a | |
// it's also used by MotiPressable's hover interactions | |
// https://github.com/nandorojo/moti/blob/master/packages/interactions/src/pressable/hoverable.tsx |
Are you looking for TypeScript 5.0 support?
Add the following resolutions to your package.json
:
{
"resolutions": {
"@babel/preset-typescript": "^7.18.6",
const withPlugins = require('next-compose-plugins') | |
const getTranspiledPackages = () => { | |
const path = require('path') | |
const fs = require('fs') | |
const node_modules = path.resolve(__dirname, '../..', 'node_modules') | |
const monorepoScope = '@beatgig' |
import { ConfigPlugin } from '@expo/config-plugins' | |
export const makePlugin = <F extends ConfigPlugin<any>, A extends Parameters<F>[1]>( | |
f: F, | |
a: A | |
): [F, A] => { | |
return [f, a] | |
} |
import React from 'react' | |
import { View, useDripsyTheme, useResponsiveValue, Theme as DripsyTheme } from 'dripsy' | |
import { pickChild } from './pick-child' | |
type Props = { | |
/** | |
* Number of columns that should appear. If you want different columns at different screen sizes, use an array of numbers. | |
*/ | |
columns?: number | number[] | |
children: React.ReactNode |
export function useSellerBookingRequestPersonalized() { | |
const getArtistsWhoMaybeCouldBid = ({ artists, bookingRequest }) => { | |
return artists?.filter((artist) => | |
bookingRequest?.artist_ids?.includes(artist.id) | |
); | |
}; | |
const getAreAllMyBidsRejected = ({ artists, bookingRequest }) => { | |
const artistsWhoMaybeCouldBid = getArtistsWhoMaybeCouldBid({ | |
artists, |
If you need to restart a React Native app, and you're using Expo, then this gist will help you do it.
It also comes with web support.
Keep in mind, this will only work if you're using a custom dev client from Expo. If you aren't, then you should delete lines 11-13, and you won't be able to restart the app in dev mode.