frontend
    Preparing search index...

    Function useGameConfig

    • Generic hook for managing game configuration state with number parsing and boolean toggling.

      Type Parameters

      • T extends object

      Parameters

      • defaultConfig: T

      Returns {
          config: T;
          handleConfigChange: (key: NumberKeys<T>, value: string) => void;
          handleToggle: (key: BooleanKeys<T>, value: boolean) => void;
          setConfig: Dispatch<SetStateAction<T>>;
      }