Socket
Socket
Sign inDemoInstall

@teko-builder/on-site-react

Package Overview
Dependencies
3
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @teko-builder/on-site-react

On Site Activation React


Version published
Maintainers
3
Created

Readme

Source

On Site Activation Client Integration

Eager to get started? This quick start guide will help you integrate builder data in client.

yarn add @teko-builder/on-site-react

# or

npm install @teko-builder/on-site-react

Note

Currently

  • Only support component popup banner
  • Only show banner at home page
  • Only show first banner
  • Revalidate every 1 minute
  • Save shown state on sessionStorage

Usage

import { lazy, Suspense } from 'react';
import SmartComponent from "@teko-builder/on-site-react";
import "@teko-builder/on-site-react/dist/base.css";

// lazy import
// const SmartComponent = lazy(() => import('@teko-builder/on-site-react));

function App() {
  const showSmartComponent = platformId && trackingAppId && iamId;

  return (
    <Suspense fallback={<>Loading</>}>
      {showSmartComponent && (
        <SmartComponent env="dev" configs={{ platformId, trackingAppId, iamId }} />
      )}
      <AnotherComponent>
    </Suspense>
  );
}

export default App;


API

Picker

PropertyTypeDefaultDescription
envdev | stag | production-environment to apply library
configsSmartComponentConfigs-Configs of smart component

SmartComponentConfigs

PropertyTypeDefaultDescription
iamIdstring-id of user on IAM system
platformIdnumber-id of platform
trackingAppIdstring-id of tracking app

FAQs

Last updated on 27 Jul 2022

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