Skip to content

Commit

Permalink
refactor(index.ts): change function name
Browse files Browse the repository at this point in the history
change function name

BREAKING CHANGE: change function name
  • Loading branch information
emekaorji committed Oct 19, 2023
1 parent e04cb5e commit 89a5164
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { useState, useEffect, Dispatch, SetStateAction } from 'react';

function useLocalStorage<T>(
function useStoreState<T>(
_key: string,
_initialValue: T | (() => T)
): [T, Dispatch<SetStateAction<T>>];
function useLocalStorage<T = undefined>(
function useStoreState<T = undefined>(
_key: string
): [T | undefined, Dispatch<SetStateAction<T | undefined>>];

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function useLocalStorage<T = undefined>(
function useStoreState<T = undefined>(
key: string,
initialValue?: T | (() => T)
) {
Expand Down Expand Up @@ -42,4 +42,4 @@ function useLocalStorage<T = undefined>(
return [value, setValue] as const;
}

export default useLocalStorage;
export default useStoreState;

0 comments on commit 89a5164

Please sign in to comment.