Skip to content

Commit

Permalink
fix(use-barn-state): change initialValue to any
Browse files Browse the repository at this point in the history
  • Loading branch information
nampdn committed Apr 22, 2019
1 parent 989111a commit db57973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/functions/use-barn-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { useBaraContext } from '../context'

export function useBarnState(
key: string,
initValue = '',
initValue?: any,
): [typeof initValue, (newState: typeof initValue) => void] {
const [data, setData] = useState(initValue)
const [data, setData] = useState(initValue || null)
const context = useBaraContext()

const setStateProxy = (newState: any): void => {
Expand Down

0 comments on commit db57973

Please sign in to comment.