1.2.4 • Published 4 years ago

devt v1.2.4

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

https://img.shields.io/npm/v/devt?style=for-the-badge

devt

This tool allows you to install a custom dev-tools on your React application.

devt will be enabled by default when process.env.NODE_ENV is either 'dev', 'develop', or 'development'.

Install

npm install --save-dev devt

Setup

In your index file, import loadDevTools and wrap your initial render with the loadDevTools function. The second argument to the loadDevTools function is an array of feature flags.

import  React from  'react';
import { render } from  'react-dom';
import { loadDevTools } from 'devt';

loadDevTools(() => {
	render (<App/>,document.querySelector('#app'))
}, ["catFeature"])
parameterstyperequireddesc
callbackfunctionYesrender(, document.querySelector('#app'))
featuresarrayYesArray of feature flags "catFeature", "coolFeature", ...Each item in the features array create a toggle to enable/disable the feature.

devt

Usage

import { featureToggles } from  'devt';

...
<div>
	{featureToggles.catFeature ? "show cats" : "hide cats"}
</div>
...
1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago