diff options
author | Cameron Crothers <jprogrammer@gmail.com> | 2019-05-07 05:14:26 +0300 |
---|---|---|
committer | Jamie Kyle <me@thejameskyle.com> | 2019-05-07 05:14:26 +0300 |
commit | e9316e0a0ce2c92eba76925d917586474322b871 (patch) | |
tree | c8619df06d6ff01f8865c58e320f4a19429973e3 /src | |
parent | eff1cbbbf8078c7171992007cf977b971a9e215d (diff) |
Export interfaces (#7)
The interfaces need to be exported so that users don't encounter TS4023 when exporting their state outside of files
ie `export const UserState = createContainer(useUserState);`
Diffstat (limited to 'src')
-rw-r--r-- | src/unstated-next.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unstated-next.tsx b/src/unstated-next.tsx index b19f8ba..94e9c79 100644 --- a/src/unstated-next.tsx +++ b/src/unstated-next.tsx @@ -1,10 +1,10 @@ import React from "react" -interface ContainerProviderProps { +export interface ContainerProviderProps { children: React.ReactNode } -interface Container<Value> { +export interface Container<Value> { Provider: React.ComponentType<ContainerProviderProps> useContainer: () => Value } |