@appannie/react-ab-testing
Advanced tools
Comparing version 1.1.5 to 1.2.0
@@ -6,2 +6,10 @@ # Change Log | ||
## 1.2.0 (2021-05-19) | ||
**Note:** Version bump only for package @appannie/react-ab-testing | ||
### 1.1.5 (2021-05-03) | ||
@@ -8,0 +16,0 @@ |
import React, { ReactNode } from 'react'; | ||
import { ABTestingConfig } from '@appannie/ab-testing'; | ||
export { ABTestingConfig }; | ||
export declare type ABTestingContextType = { | ||
hasExperiment: (experimentName: string) => boolean; | ||
getCohort: (experimentName: string) => string; | ||
}; | ||
export declare const ABTestingController: React.FunctionComponent<{ | ||
@@ -13,1 +17,2 @@ config: ABTestingConfig; | ||
export declare function useCohortOf(experimentName: string): string; | ||
export declare const useABTestingController: () => ABTestingContextType; |
@@ -6,6 +6,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useCohortOf = exports.ABTestingController = void 0; | ||
exports.useABTestingController = exports.useCohortOf = exports.ABTestingController = void 0; | ||
const react_1 = __importDefault(require("react")); | ||
const ab_testing_1 = __importDefault(require("@appannie/ab-testing")); | ||
const ABTestingContext = react_1.default.createContext({ | ||
hasExperiment: () => false, | ||
getCohort: () => 'control', | ||
@@ -27,1 +28,3 @@ }); | ||
exports.useCohortOf = useCohortOf; | ||
const useABTestingController = () => react_1.default.useContext(ABTestingContext); | ||
exports.useABTestingController = useABTestingController; |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.1.5", | ||
"version": "1.2.0", | ||
"description": "", | ||
@@ -21,3 +21,3 @@ "files": [ | ||
"dependencies": { | ||
"@appannie/ab-testing": "^1.1.5" | ||
"@appannie/ab-testing": "^1.2.0" | ||
}, | ||
@@ -27,3 +27,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "8df380403d80787764e58018cc7d2bd5a4193760" | ||
"gitHead": "20870324a161b3a926ed9ddd8bf12350157ea1bc" | ||
} |
Sorry, the diff of this file is not supported yet
19652
45
Updated@appannie/ab-testing@^1.2.0