Skip to content

Commit

Permalink
fix: disable debug and browser cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rayriffy committed Jun 29, 2020
1 parent 0fc88ac commit 2860e0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
18 changes: 9 additions & 9 deletions apps/web/src/gatsby/browser/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
// import React from 'react'

export * from './onServiceWorkerInstalled'
export * from './onServiceWorkerUpdateFound'
Expand All @@ -7,11 +7,11 @@ export * from './onServiceWorkerUpdateReady'
export * from './wrapPageElement'
export * from './wrapRootElement'

export const onClientEntry = () => {
if (process.env.NODE_ENV !== 'production') {
const whyDidYouRender = require('@welldone-software/why-did-you-render')
whyDidYouRender(React, {
trackAllPureComponents: true
})
}
}
// export const onClientEntry = () => {
// if (process.env.NODE_ENV !== 'production') {
// const whyDidYouRender = require('@welldone-software/why-did-you-render')
// whyDidYouRender(React, {
// trackAllPureComponents: true
// })
// }
// }
2 changes: 1 addition & 1 deletion apps/web/src/gatsby/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const config: GatsbyConfig = {
},
pathPrefix: '/',
plugins: [
`gatsby-plugin-why-did-you-render`,
// `gatsby-plugin-why-did-you-render`,
`gatsby-plugin-postcss`,
{
resolve: require.resolve(`@nrwl/gatsby/plugins/nx-gatsby-ext-plugin`),
Expand Down
3 changes: 0 additions & 3 deletions apps/web/src/store/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ export const useStoreon = customContext(StoreonContext)
export const Context: React.FC = props => {
const { children } = props

const clientSession = Math.random().toString(36).substring(3)

return (
<StoreonContext.Provider value={store}>
{clientSession}
{children}
</StoreonContext.Provider>
)
Expand Down

0 comments on commit 2860e0b

Please sign in to comment.