mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
force update fix
in react we cann pass callback to forceUpdate
This commit is contained in:
4
react/react.d.ts
vendored
4
react/react.d.ts
vendored
@@ -135,7 +135,7 @@ declare namespace __React {
|
||||
constructor(props?: P, context?: any);
|
||||
setState(f: (prevState: S, props: P) => S, callback?: () => any): void;
|
||||
setState(state: S, callback?: () => any): void;
|
||||
forceUpdate(): void;
|
||||
forceUpdate(callBack?: () => any): void;
|
||||
render(): JSX.Element;
|
||||
props: P;
|
||||
state: S;
|
||||
@@ -932,7 +932,7 @@ declare module "react/addons" {
|
||||
constructor(props?: P, context?: any);
|
||||
setState(f: (prevState: S, props: P) => S, callback?: () => any): void;
|
||||
setState(state: S, callback?: () => any): void;
|
||||
forceUpdate(): void;
|
||||
forceUpdate(callBack?: () => any): void;
|
||||
render(): JSX.Element;
|
||||
props: P;
|
||||
state: S;
|
||||
|
||||
Reference in New Issue
Block a user