dev.ts 353 B

1234567891011
  1. import React from 'react';
  2. export function initDevFeatures() {
  3. // if why-render is in url enable why did you render react extension
  4. if (window.location.search.indexOf('why-render') !== -1) {
  5. const whyDidYouRender = require('@welldone-software/why-did-you-render');
  6. whyDidYouRender(React, {
  7. trackAllPureComponents: true,
  8. });
  9. }
  10. }