INNER CODE UNIT · TypeScript
PureComponent
infernojs/inferno · packages/inferno-compat/src/index.ts:355
abstract class PureComponent<
P = Record<string, unknown>,
S = Record<string, unknown>,
> extends Component<P, S> {
public shouldComponentUpdate(props, state): boolean {
return (
shallowDiffers(this.props, props) || shallowDiffers(this.state, state)
);
}
}
interface ContextProps {
children?: InfernoNode;
context: any;
}
class WrapperComponent<P, S> extends Component<P & ContextProps, S> {
public getChildContext(): (P & ContextProps)['context'] {