From 70697d962604130fb0f0b012e1d55bb45017130c Mon Sep 17 00:00:00 2001 From: streamich Date: Thu, 30 May 2019 19:57:10 +0200 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20fix=20linting=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/useSetState.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/useSetState.ts b/src/useSetState.ts index 056eaca6..d0900439 100644 --- a/src/useSetState.ts +++ b/src/useSetState.ts @@ -1,6 +1,8 @@ import { useState } from 'react'; -const useSetState = (initialState: T = {} as T): [T, (patch: Partial | ((prevState: T) => Partial)) => void] => { +const useSetState = ( + initialState: T = {} as T +): [T, (patch: Partial | ((prevState: T) => Partial)) => void] => { const [state, set] = useState(initialState); const setState = patch => { set(prevState => Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch));