Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

splitio-react

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splitio-react - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

6

lib/hooks/use-init-split-client.js

@@ -37,2 +37,3 @@ "use strict";

var hasSplitLoaded = !!splitio;
(0, _react.useEffect)(function () {

@@ -50,3 +51,3 @@ var initSplitClient =

case 0:
if (key) {
if (!(!key || !splitio)) {
_context.next = 2;

@@ -59,3 +60,2 @@ break;

case 2:
// eslint-disable-next-line no-undef
client = splitio({

@@ -90,3 +90,3 @@ core: {

initSplitClient();
}, [key]);
}, [key, hasSplitLoaded, authorizationKey, trafficType]);
return splitClient;

@@ -93,0 +93,0 @@ };

{
"name": "splitio-react",
"version": "1.0.2",
"version": "1.0.3",
"description": "react split-io wrapper library",

@@ -5,0 +5,0 @@ "repository": "https://github.com/kyle-ruan/splitio-react.git",

@@ -0,1 +1,2 @@

/* eslint-disable no-undef */
import { useState, useEffect } from 'react';

@@ -13,10 +14,10 @@

const [splitClient, setSplitClient] = useState();
const hasSplitLoaded = !!splitio;
useEffect(() => {
const initSplitClient = async () => {
if (!key) {
if (!key || !splitio) {
return;
}
// eslint-disable-next-line no-undef
const client = splitio({

@@ -40,3 +41,3 @@ core: {

initSplitClient();
}, [key]);
}, [key, hasSplitLoaded, authorizationKey, trafficType]);

@@ -43,0 +44,0 @@ return splitClient;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc