Skip to content

Commit 25449ec

Browse files
committed
main 🧊 add usage badge for helpers
1 parent 519a2e0 commit 25449ec

File tree

17 files changed

+17
-5
lines changed

17 files changed

+17
-5
lines changed

β€Žpackages/core/src/bundle/helpers/createContext/createContext.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { createContext as createReactContext, useContext, useMemo, useState } fr
44
* @name createContext
55
* @description - Creates a typed context with additional utilities
66
* @category Helpers
7+
* @usage high
78
*
89
* @template Value - The type of value that will be stored in the context
910
* @param {Value | undefined} [defaultValue] - Default value for the context

β€Žpackages/core/src/bundle/helpers/createEventEmitter/createEventEmitter.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useEffect, useRef, useState } from 'react';
33
* @name createEventEmitter
44
* @description - Creates a type-safe event emitter
55
* @category Helpers
6+
* @usage low
67
*
78
* @template Events - The type of events and their data
89
* @returns {EventEmitterApi<Events>} - Object containing event emitter methods and hook

β€Žpackages/core/src/bundle/helpers/createReactiveContext/createReactiveContext.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const createReactiveContextSelector = (Context, selector, options = {}) => {
6161
* @name createReactiveContext
6262
* @description - Creates a typed context selector with optimized updates for state selection
6363
* @category Helpers
64+
* @usage low
6465
*
6566
* @warning - For complex interfaces, we strongly recommend using state management solutions outside of React like createStore, reatom, effector, or zustand instead of context
6667
*

β€Žpackages/core/src/bundle/helpers/createStore/createStore.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useSyncExternalStore } from 'react';
33
* @name createStore
44
* @description - Creates a store with state management capabilities
55
* @category Helpers
6+
* @usage medium
67
*
78
* @template Value - The type of the store state
89
* @param {StateCreator<Value>} createState - Function that initializes the store state

β€Žpackages/core/src/bundle/hooks/useKeysPressed/useKeysPressed.jsβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { useEffect, useState } from 'react';
22
import { getElement, isTarget } from '@/utils/helpers';
33
import { useRefState } from '../useRefState/useRefState';
44
/**
5-
* Hook that tracks which keyboard keys are currently pressed
6-
*
75
* @name useKeysPressed
86
* @description Tracks all currently pressed keyboard keys and their codes
97
* @category Sensors

β€Žpackages/core/src/bundle/hooks/useLastChanged/useLastChanged.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useDidUpdate } from '../useDidUpdate/useDidUpdate';
55
* @description - Hook for records the timestamp of the last change
66
* @category Utilities
77
* @usage low
8+
*
89
* @param {any} source The source of the last change
910
* @param {number | null} [options.initialValue=null] The initial value
1011
* @returns {number | null} Return timestamp of the last change

β€Žpackages/core/src/bundle/hooks/useMediaQuery/useMediaQuery.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const getServerSnapshot = () => false;
55
* @description - Hook that manages a media query
66
* @category Browser
77
* @usage medium
8+
*
89
* @browserapi window.matchMedia https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
910
*
1011
* @param {string} query The media query string

β€Žpackages/core/src/bundle/hooks/useVirtualKeyboard/useVirtualKeyboard.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
33
* @name useVirtualKeyboard
44
* @description - Hook that manages virtual keyboard state
55
* @category Browser
6+
* @usage low
67
*
78
* @browserapi VirtualKeyboard https://developer.mozilla.org/en-US/docs/Web/API/VirtualKeyboard
89
*

β€Žpackages/core/src/helpers/createContext/createContext.tsxβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export interface CreateContextReturn<Value> {
4343
* @name createContext
4444
* @description - Creates a typed context with additional utilities
4545
* @category Helpers
46+
* @usage high
4647
*
4748
* @template Value - The type of value that will be stored in the context
4849
* @param {Value | undefined} [defaultValue] - Default value for the context

β€Žpackages/core/src/helpers/createEventEmitter/createEventEmitter.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from 'react';
44
* @name createEventEmitter
55
* @description - Creates a type-safe event emitter
66
* @category Helpers
7+
* @usage low
78
*
89
* @template Events - The type of events and their data
910
* @returns {EventEmitterApi<Events>} - Object containing event emitter methods and hook

0 commit comments

Comments
Β (0)