Last active
October 31, 2018 17:08
-
-
Save schneidmaster/0a6aa5a65c753e851346b6130841d571 to your computer and use it in GitHub Desktop.
Revisions
-
schneidmaster revised this gist
Oct 31, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ declare module 'react' { initialAction?: Object, ): [T, (action: Object) => void]; export function useCallback(callback: Function, inputs: Array<any>): Function; export function useMemo<T>(memoized: Function, inputs: Array<any>): T; export function useRef<T>(initialValue?: any): RefObject<T>; export function useImperativeMethods<T>( ref: RefObject<T>, -
schneidmaster revised this gist
Oct 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { Context, RefObject } from 'react'; declare module 'react' { export function useState<T>(initialValue: T): [T, (newState: T) => void]; export function useEffect(effect: Function, inputs?: Array<any>): void; export function useMutationEffect(effect: Function, inputs?: Array<any>): void; export function useLayoutEffect(effect: Function, inputs?: Array<any>): void; -
schneidmaster revised this gist
Oct 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { Context, RefObject } from 'react'; declare module 'react' { export function useState(initialValue: any): [any, (newState: any) => void]; export function useEffect(effect: Function, inputs?: Array<any>): void; export function useMutationEffect(effect: Function, inputs?: Array<any>): void; export function useLayoutEffect(effect: Function, inputs?: Array<any>): void; export function useContext<T>(context: Context<T>): any; export function useReducer<T>( -
schneidmaster revised this gist
Oct 26, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ // Typescript definitions for React hooks // Take with a grain of salt; these are a first attempt and I've only actually // used a few so far :) import { Context, RefObject } from 'react'; declare module 'react' { -
schneidmaster created this gist
Oct 26, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ // Typescript definitions for React hooks import { Context, RefObject } from 'react'; declare module 'react' { export function useState(initialValue: any): [any, (newState: any) => void]; export function useEffect(effect: Function, inputs?: Array<any>): void; export function useMemoizedEffect(effect: Function, inputs?: Array<any>): void; export function useLayoutEffect(effect: Function, inputs?: Array<any>): void; export function useContext<T>(context: Context<T>): any; export function useReducer<T>( reducer: (state: T, action: Object) => T, initialState: T, initialAction?: Object, ): [T, (action: Object) => void]; export function useCallback(callback: Function, inputs: Array<any>): Function; export function useMemo(memoized: Function, inputs: Array<any>): any; export function useRef<T>(initialValue?: any): RefObject<T>; export function useImperativeMethods<T>( ref: RefObject<T>, createInstance: () => Object, inputs?: Array<any> ): void; }