Permalink
Browse files

refactor(typescript): Remove useless type casting from `createContext`

  • Loading branch information...
diegohaz committed Jan 17, 2019
1 parent f43edef commit 868466af6bd2992e13077ab342adc2a9f14b4ec2
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/index.tsx
@@ -19,7 +19,7 @@ function createContainer<P, V>(
useValue: (props: P) => V,
createMemoInputs?: (value: V) => any[]
) {
const Context = React.createContext<V>(defaultValue as V);
const Context = React.createContext(defaultValue as V);

const Provider = (props: { children?: React.ReactNode } & P) => {
const value = useValue(props);

0 comments on commit 868466a

Please sign in to comment.