2.0.1 • Published 2 years ago

react-reduce-stress v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

react-reduce-stress

React comes with a lot of useful console logs and errors, but the ONE is missing. This package informs you when React.StrictMode is active and React will unmount and remount every component, whenever a component mounts for the first time.

Install

yarn add react-reduce-stress
import { ReduceStress } from "react-reduce-stress";

// just place it anywhere inside <React.StrictMode>
root.render(
  <React.StrictMode>
    <ReduceStress />
    <App />
  </React.StrictMode>
);

Supress Console Warnings/Errors usage

supressConsoleWarnings({
  hooksOrder: ["NavigationHeader"], // hide warnings for hooks order for the NavigationHeader component
  uniqueKeyInList: ["AvatarGroup"], // hide warnings for unique key in list for the AvatarGroup component
  useNativeDriver: true, // hide warnings for useNativeDriver (React Native)
  setNativeProps: true, // hide warnings for setNativeProps (React Native)
});

Outcome: A peaceful Console at your discression for debugging.

Roadmap

If you have warning that really annoyes you, please open a pull-request and we will add it to the list.

1.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago