Skip to content

Commit 43f7213

Browse files
Update deprecation comment
1 parent 01746e3 commit 43f7213

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/useManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useSplitManager } from './useSplitManager';
88
* @return A Split Manager instance, or null if used outside the scope of SplitFactory
99
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#manager}
1010
*
11-
* @deprecated useSplitManager is the new hook to use.
11+
* @deprecated Replace with the new `useSplitManager` hook.
1212
*/
1313
export function useManager(): SplitIO.IManager | null {
1414
return useSplitManager().manager;

src/useSplitManager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import { ISplitContextValues } from './types';
77
* It uses the 'useContext' hook to access the factory at Split context, which is updated by the SplitFactory component.
88
*
99
* @return An object containing the Split context and the Split Manager instance, which is null if used outside the scope of SplitFactory
10+
*
11+
* @example
12+
* ```js
13+
* const { manager, isReady } = useSplitManager();
14+
* ```
15+
*
1016
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#manager}
1117
*/
1218
export function useSplitManager(): ISplitContextValues & { manager: SplitIO.IManager | null } {

types/useManager.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
* @return A Split Manager instance, or null if used outside the scope of SplitFactory
77
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#manager}
88
*
9-
* @deprecated useSplitManager is the new hook to use.
9+
* @deprecated Replace with the new `useSplitManager` hook.
1010
*/
1111
export declare function useManager(): SplitIO.IManager | null;

types/useSplitManager.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import { ISplitContextValues } from './types';
44
* It uses the 'useContext' hook to access the factory at Split context, which is updated by the SplitFactory component.
55
*
66
* @return An object containing the Split context and the Split Manager instance, which is null if used outside the scope of SplitFactory
7+
*
8+
* @example
9+
* ```js
10+
* const { manager, isReady } = useSplitManager();
11+
* ```
12+
*
713
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#manager}
814
*/
915
export declare function useSplitManager(): ISplitContextValues & {

0 commit comments

Comments
 (0)