main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
668 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | /* @flow */
|
---|
| 2 |
|
---|
| 3 | declare type UpdateOn<T> = Array<$Keys<T> | any[]>;
|
---|
| 4 |
|
---|
| 5 | declare export function immutableMemo<Props>(
|
---|
| 6 | component: React$ComponentType<Props>,
|
---|
| 7 | updateOnProps?: UpdateOn<Props>,
|
---|
| 8 | ): React$ComponentType<Props>;
|
---|
| 9 |
|
---|
| 10 | declare export class ImmutablePureComponent<
|
---|
| 11 | Props,
|
---|
| 12 | State = void,
|
---|
| 13 | > extends React$Component<Props, State> {
|
---|
| 14 | // TODO: Due to bugs in Flow's handling of React.createClass, some fields
|
---|
| 15 | // already declared in the base class need to be redeclared below. Ideally
|
---|
| 16 | // they should simply be inherited.
|
---|
| 17 |
|
---|
| 18 | updateOnProps: UpdateOn<Props>;
|
---|
| 19 | updateOnStates: UpdateOn<State>;
|
---|
| 20 |
|
---|
| 21 | props: Props;
|
---|
| 22 | state: State;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | export default ImmutablePureComponent;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.