Skip to content

Commit

Permalink
chore: trying why did you render
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Feb 14, 2023
1 parent 9015151 commit 7595f13
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/graphql/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,5 @@ const LanguageSync = () => {
return <></>
}

GaloyClient.whyDidYouRender = true
export { GaloyClient }
12 changes: 12 additions & 0 deletions app/wdyr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// importing why-did-you-render types
// eslint-disable-next-line
/// <reference types="@welldone-software/why-did-you-render" />

import React from "react"

if (process.env.NODE_ENV === "development") {
const whyDidYouRender = require("@welldone-software/why-did-you-render")
whyDidYouRender(React, {
trackAllPureComponents: false,
})
}
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
//
// It's easier just to leave it here.

import "./app/wdyr.ts"

import { AppRegistry } from "react-native"
import { App } from "./app/app.tsx"
import * as React from "react"
Expand Down
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
boost: 57d2868c099736d80fcd648bf211b4431e51a558
BVLinearGradient: 34a999fda29036898a09c6a6b728b0b4189e1a44
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: d58428b28fe1f5070fe993495b0e2eaf701d3820
Expand All @@ -831,7 +831,7 @@ SPEC CHECKSUMS:
FirebaseInstallations: 935bc4abb6f7a035cab7a0c31cb777b2be3dd254
FirebaseMessaging: e7304d6ce5f83d9139f0a61383a2302beb99b111
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: 173fa22ce7d62c29332568e853b39b2525a0e584
GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
GoogleMLKit: 0017a6a8372e1a182139b9def4d89be5d87ca5a7
Expand All @@ -849,7 +849,7 @@ SPEC CHECKSUMS:
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
Protobuf: 120350fc38646e2dedc26f49ecba778184ea1de2
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: c154ebcfbf41d6fef86c52674fc1aa08837ff538
RCTTypeSafety: 3063e5a1e5b1dc2cbeda5c8f8926c0ad1a6b0871
React: 0a1a36e8e81cfaac244ed88b97f23ab56e5434f0
Expand Down Expand Up @@ -908,6 +908,6 @@ SPEC CHECKSUMS:
Yoga: 5b0304b3dbef2b52e078052138e23a19c7dacaef
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

PODFILE CHECKSUM: 8de10ceae4adc8e2ff6b6a95a347c614de6c9ac5
PODFILE CHECKSUM: ca00050bf0b59ff1e3d5300e83bb7c916602e50f

COCOAPODS: 1.11.3
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"@wdio/local-runner": "^7.19.7",
"@wdio/mocha-framework": "^7.19.7",
"@wdio/spec-reporter": "^7.25.1",
"@welldone-software/why-did-you-render": "^7.0.1",
"babel-jest": "^29.4.1",
"babel-loader": "^9.1.2",
"babel-plugin-module-resolver": "^5.0.0",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5391,6 +5391,13 @@
"@webassemblyjs/wast-parser" "1.9.0"
"@xtuc/long" "4.2.2"

"@welldone-software/why-did-you-render@^7.0.1":
version "7.0.1"
resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-7.0.1.tgz#09f487d84844bd8e66435843c2e0305702e61efb"
integrity sha512-Qe/8Xxa2G+LMdI6VoazescPzjjkHYduCDa8aHOJR50e9Bgs8ihkfMBY+ev7B4oc3N59Zm547Sgjf8h5y0FOyoA==
dependencies:
lodash "^4"

"@whatwg-node/events@0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@whatwg-node/events/-/events-0.0.2.tgz#7b7107268d2982fc7b7aff5ee6803c64018f84dd"
Expand Down Expand Up @@ -13637,7 +13644,7 @@ lodash.zip@^4.2.0:
resolved "https://registry.yarnpkg.com/lodash.zip/-/lodash.zip-4.2.0.tgz#ec6662e4896408ed4ab6c542a3990b72cc080020"
integrity sha512-C7IOaBBK/0gMORRBd8OETNx3kmOkgIWIPvyDpZSCTwUrpYmgZwJkjZeOD8ww4xbOUOs4/attY+pciKvadNfFbg==

lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.0:
lodash@^4, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.0:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
Expand Down

0 comments on commit 7595f13

Please sign in to comment.