@rogntudju/checker
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

@rogntudju/checker

A specialized HOC that detects useless re-renders in dev mode.

Usage

import { checker } from "@rogntudju/checker";
import { Component } from "yourComponent.jsx";

// Builds your specialized component that checks for useless re-renders
const Wrapper = checker(connect);

Enabling or disabling checks

By default, checks are enabled only in dev mode (process.env.NODE_ENV !== "production").

If you wish to override this, there an optional parameter to the checker() function.

const checkEnabled: boolean = isUselessRenderingCheckEnabled();
const Wrapper = checker(connect, checkEnabled);

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @rogntudju/checker

    Weekly Downloads

    0

    Version

    0.0.11

    License

    MIT

    Unpacked Size

    14.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • florent.legall