simbathesailor / use-what-changed

A React hook and an easy to use babel-pugin to debug various React official hooks
https://codesandbox.io/s/simabthesailoruse-what-changed-demo-q94rn
MIT License
658 stars 12 forks source link

Adding configuration for use-what-changed to ease-in optin for non babel plugin user #16

Closed simbathesailor closed 3 years ago

simbathesailor commented 3 years ago

Current check

const isDevelopment = process.env['NODE_ENV'] === 'development';

Desired API:

import {setUseWhatChange} from "@simbathesailor/use-what-changed"

setUseWhatChange({
  active: process.env['NODE_ENV'] === 'development
}) 
simbathesailor commented 3 years ago

Done