Socket
Socket
Sign inDemoInstall

@growthbook/dev

Package Overview
Dependencies
8
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @growthbook/dev

Adds a widget to your site that helps during development of GrowthBook A/B tests.


Version published
Maintainers
1
Install size
1.17 MB
Created

Readme

Source

GrowthBook SDK Dev Mode

Adds a widget to your site that helps during development of GrowthBook A/B tests.

Currently only supports client-side SDKs (javascript and react). Server-side support is coming soon!

Only for use on development/staging builds. Do not use in production!!!

Dev Mode Variation Switcher

Usage

To use, simply add a script tag to your development HTML:

<script
  async
  src="https://unpkg.com/@growthbook/dev/dist/bundles/index.min.js"
></script>

OR if you are using the GrowthBook React SDK, you can render the dev mode component directly if you prefer:

import { GrowthBook, GrowthBookProvider } from "@growthbook/growthbook-react";
import { GrowthBookDev } from "@growthbook/dev";

const growthbook = new GrowthBook({
  user: { id: "1" },
});

export default function MyApp() {
  return (
    <GrowthBookProvider growthbook={growthbook}>
      <App />
      {process.env.NODE_ENV !== "production" && <GrowthBookDev />}
    </GrowthBookProvider>
  );
}

FAQs

Last updated on 29 Oct 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc