- Change React and React Native versions in
package.json - Run
yarn installto upgrade dependencies - Run
yarn outdatedoryarn upgrade-interactiveto upgrade outdated libraries. Make sure that there's no breaking changes, check release notes (one by one). - Compare your changes with the diff or use the upgrade-helper and update the native code.
- Open Xcode and link the binaries
- Run iOS
- Test iOS
- Run on Android
- Test Android
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 { | |
| Environment, | |
| Network, | |
| RecordSource, | |
| Store, | |
| } from 'relay-runtime'; | |
| import { RelayTransactionLogger } from './RelayTransactionLogger'; | |
| // Define a function that fetches the results of an operation (query/mutation/etc) |
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 { useNavigationParam } from 'react-navigation-hooks'; | |
| import { graphql, usePreloadedQuery } from 'react-relay/hooks'; | |
| const query = graphql` | |
| query TaskDetailQuery($nodeId: ID!) { | |
| task: node(id: $nodeId) { | |
| ... on Task { | |
| title | |
| } | |
| } |
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 { Animated, Keyboard, KeyboardEvent, Platform } from 'react-native'; | |
| type Props = { | |
| offset?: number; | |
| }; | |
| type State = { | |
| keyboardHeightAnim: Animated.Value; | |
| }; |
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
| // src/pages/Homepage.tsx | |
| import React from "react"; | |
| export default function Homepage() { | |
| return <div>Homepage/div>; | |
| } |
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 React, { useCallback, useState } from "react" | |
| import { useDropzone } from "react-dropzone" | |
| import mime from "mime-types" | |
| import firebase, { storage } from "../../firebase/firebaseServices" | |
| interface IFileUpload { | |
| path: string, | |
| onUpload: (filePath: string) => 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
| import idx from 'idx'; | |
| import { ForwardFeature } from './mapboxTypes'; | |
| export interface AddressResult { | |
| id?: string | null; | |
| fullAddress?: string | null; | |
| shortAddress?: string | null; | |
| zipcode?: string | null; | |
| street?: string | null; |
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 path = require('path'); | |
| const webpack = require('webpack'); | |
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| const dotEnv = require('dotenv-webpack'); | |
| const HappyPack = require('happypack'); | |
| const Serve = require('webpack-plugin-serve'); | |
| const workboxPlugin = require('workbox-webpack-plugin'); | |
| const PORT = process.env.PORT; |
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
| /* | |
| * Usage | |
| * let cursor = Test.find().sort({ name: 1 }).cursor(); | |
| const get = makeGen(cursor, 100); | |
| let first100 = await get.next(); | |
| console.log(first100.value.length); | |
| https://gist.github.com/lineus/3f7d826a21796129db968d6590c93faa | |
| */ | |
| export async function* batchCursor(c, n) { | |
| const cursor = c; |
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
| find src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.tsx"' {} \; |