Skip to content

Commit 976e998

Browse files
committed
[ts] fixed global state type
1 parent 1bcd990 commit 976e998

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { View } from "react-native";
55
type IndexedObject = { [key: string]: any };
66

77
const GlobalStateContext = createContext<
8-
[globalState: object, setGlobalState: (PartialState: object) => void]
8+
[globalState: IndexedObject, setGlobalState: (PartialState: object) => void]
99
>([{}, () => null]);
1010

1111
/**
@@ -40,7 +40,7 @@ const GlobalStoreProvider: FunctionComponent<{
4040
initialState = {},
4141
persistedKeys = [],
4242
loadingUI = <View />,
43-
storageKey = "GlobalStoreProvider"
43+
storageKey = "GlobalStateProvider"
4444
}) => {
4545
const [globalState, updateState] = useState<IndexedObject>({});
4646
const [isLoading, setLoading] = useState(true);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-global-store",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "React Native App Store state holder and persistor",
55
"main": "index.tsx",
66
"scripts": {

0 commit comments

Comments
 (0)