check-re-render

1.0.5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i check-re-render

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

2.32 kB

Total Files

3

Last publish

Collaborators

  • navid.asgharzadeh