mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Fixed an issue with infinite rerendering on app routes by making it a Pure component. Adds `why-did-you-render` for development use. Co-authored-by: Taso <[email protected]>
10 lines
283 B
TypeScript
10 lines
283 B
TypeScript
/// <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: true,
|
|
});
|
|
}
|