Skip to content

Commit 2652f9c

Browse files
committed
refactor: rename useRestate types
1 parent c089da2 commit 2652f9c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const useStore = () => {
1818

1919
export const RestateProvider = RestateContext.Provider;
2020

21-
export function useRestate<T, U>(selectFrom: (state: T) => U): [U, Dispatch] {
21+
export function useRestate<TState, USelector>(
22+
selectFrom: (state: TState) => USelector,
23+
): [USelector, Dispatch] {
2224
const store = useStore();
2325

2426
const [restate, setRestate] = useState(() => selectFrom(store.getState()));

0 commit comments

Comments
 (0)