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:
641 bytes
|
Line | |
---|
1 | export as namespace ImmutablePureComponent;
|
---|
2 |
|
---|
3 | import { Component, ComponentType, NamedExoticComponent, MemoExoticComponent, FC } from 'react';
|
---|
4 |
|
---|
5 | type UpdateOn<T> = Array<keyof T | any[]>
|
---|
6 |
|
---|
7 | export function immutableMemo<P extends object>( Component: FC<P>, updateOnProps?: UpdateOn<P>): NamedExoticComponent<P>;
|
---|
8 | export function immutableMemo<T extends ComponentType<any>>( Component: T, updateOnProps?: UpdateOn<T>): MemoExoticComponent<T>;
|
---|
9 |
|
---|
10 | export class ImmutablePureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> {
|
---|
11 | updateOnProps: UpdateOn<P>;
|
---|
12 | updateOnStates: UpdateOn<S>;
|
---|
13 | }
|
---|
14 |
|
---|
15 | export default ImmutablePureComponent;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.