feat: add why-did-you-render

This commit is contained in:
Tristan Yang
2022-08-31 22:14:32 +08:00
parent 65f8917657
commit 91254d0fbd
5 changed files with 22 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
/// <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
});
}