Skip to content

Babel Plugin that wraps profiler to each component in your code base

Notifications You must be signed in to change notification settings

chakrihacker/babel-plugin-wrap-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-wrap-profiler

A Babel plugin that wraps components with Profiler.

Usage

Install

For Yarn

yarn add -D babel-plugin-wrap-profiler

For npm

npm install --save-dev babel-plugin-wrap-profiler

Configure Babel

// In your .babelrc
{
    "plugins": [
        "babel-plugin-wrap-profiler"
    ]
}

Log Profiler Results

// In your code
import React from 'react';
import { logComponents } from "babel-plugin-wrap-profiler/lib/profiler-utils";


const Component = () => {
    return (
        <button onClick={logComponents}>
            Log Components
        </button>
    );
};

Credits

About

Babel Plugin that wraps profiler to each component in your code base

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published