• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

preactjs / preact / 11733464571

08 Nov 2024 12:07AM UTC coverage: 99.488%. Remained the same
11733464571

Pull #4545

github

web-flow
Merge dfbb9eb74 into 07dc9f324
Pull Request #4545: types: Use `Signalish` helper to reduce verbosity

1194 of 1225 branches covered (97.47%)

777 of 781 relevant lines covered (99.49%)

13274.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/compat/src/PureComponent.js
1
import { Component } from 'preact';
2
import { shallowDiffers } from './util';
3

4
/**
5
 * Component class with a predefined `shouldComponentUpdate` implementation
6
 */
7
export function PureComponent(p, c) {
8
        this.props = p;
6✔
9
        this.context = c;
10
}
11
PureComponent.prototype = new Component();
12
// Some third-party libraries check if this property is present
13
PureComponent.prototype.isPureReactComponent = true;
14
PureComponent.prototype.shouldComponentUpdate = function (props, state) {
15
        return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
8✔
16
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc