Created
November 2, 2018 10:15
-
-
Save sneljo1/6653477989372077f3abeddc51b1f11c to your computer and use it in GitHub Desktop.
Extend react types to support React.memo
This file contains 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 characters
import { StatelessComponent, SFCElement } from "react"; | |
declare module "react" { | |
function memo<P>( | |
type: StatelessComponent<P>, | |
compare?: (oldProps: P, newProps: P) => boolean | |
): SFC<P>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment