check-re-render
v1.0.5
Published
> Easily check which prop is causing re-rendering your react component.
Downloads
1
Readme
check-re-render
Easily check which prop is causing re-rendering your react component.
Install
npm i check-re-render
Usage
import React, { Component } from "react";
import useWhichPropDidIt from "check-re-render";
const Example = (props) => {
useWhichPropDidIt("Count", props);
return <div>...</div>;
};
import { checkRenderCause } from "check-re-render";
componentDidUpdate(prevProps, prevState) {
checkRenderCause(prevProps, prevState, this.props, this.state)
}
;
License
MIT © navid-asgharzadeh