@devcycle/react-client-sdk
Advanced tools
Comparing version 1.23.0 to 1.23.1
@@ -149,11 +149,9 @@ 'use strict'; | ||
function withDevCycleProvider(config) { | ||
return (WrappedComponent) => { | ||
const HoistedComponent = (props) => { | ||
return (jsxRuntime.jsx(DevCycleProvider, { config: config, children: jsxRuntime.jsx(WrappedComponent, { ...props }) })); | ||
}; | ||
hoistNonReactStatics__default["default"](HoistedComponent, WrappedComponent); | ||
return HoistedComponent; | ||
}; | ||
} | ||
const withDevCycleProvider = (config) => (WrappedComponent) => { | ||
const HoistedComponent = react.forwardRef((props, ref) => { | ||
return (jsxRuntime.jsx(DevCycleProvider, { config: config, children: jsxRuntime.jsx(WrappedComponent, { ...props, ref: ref }) })); | ||
}); | ||
hoistNonReactStatics__default["default"](HoistedComponent, WrappedComponent); | ||
return HoistedComponent; | ||
}; | ||
/** | ||
@@ -160,0 +158,0 @@ * @deprecated Use withDevCycleProvider instead |
import { jsx, jsxs, Fragment } from 'react/jsx-runtime'; | ||
import { createContext, useContext, useState, useCallback, useEffect, useRef } from 'react'; | ||
import { createContext, useContext, useState, useCallback, useEffect, useRef, forwardRef } from 'react'; | ||
import { initializeDevCycle } from '@devcycle/js-client-sdk'; | ||
@@ -141,11 +141,9 @@ import hoistNonReactStatics from 'hoist-non-react-statics'; | ||
function withDevCycleProvider(config) { | ||
return (WrappedComponent) => { | ||
const HoistedComponent = (props) => { | ||
return (jsx(DevCycleProvider, { config: config, children: jsx(WrappedComponent, { ...props }) })); | ||
}; | ||
hoistNonReactStatics(HoistedComponent, WrappedComponent); | ||
return HoistedComponent; | ||
}; | ||
} | ||
const withDevCycleProvider = (config) => (WrappedComponent) => { | ||
const HoistedComponent = forwardRef((props, ref) => { | ||
return (jsx(DevCycleProvider, { config: config, children: jsx(WrappedComponent, { ...props, ref: ref }) })); | ||
}); | ||
hoistNonReactStatics(HoistedComponent, WrappedComponent); | ||
return HoistedComponent; | ||
}; | ||
/** | ||
@@ -152,0 +150,0 @@ * @deprecated Use withDevCycleProvider instead |
{ | ||
"name": "@devcycle/react-client-sdk", | ||
"version": "1.23.0", | ||
"version": "1.23.1", | ||
"description": "The DevCycle React SDK used for feature management.", | ||
@@ -5,0 +5,0 @@ "author": "DevCycle <support@devcycle.com>", |
import { ProviderConfig } from './types'; | ||
import React from 'react'; | ||
export declare function withDevCycleProvider<T extends object>(config: ProviderConfig): (WrappedComponent: React.ComponentType<T>) => React.ComponentType<T>; | ||
import React, { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react'; | ||
export declare const withDevCycleProvider: <T extends object>(config: ProviderConfig) => (WrappedComponent: React.ComponentType<T>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<unknown>>; | ||
/** | ||
* @deprecated Use withDevCycleProvider instead | ||
*/ | ||
export declare const withDVCProvider: typeof withDevCycleProvider; | ||
export declare const withDVCProvider: <T extends object>(config: ProviderConfig) => (WrappedComponent: React.ComponentType<T>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<unknown>>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26559
606