Files
Asger F 87ed86e4fd JS: Update UnusedOrUndefinedStateProperty
Using RelatedLocations to add clarity
2025-02-28 13:29:18 +01:00

22 lines
341 B
JavaScript

class C1 extends React.Component {
state = {
p1: ''
}
static getDerivedStateFromProps(props, state) {
const { p1: p2 } = state
}
}
class C2 extends React.Component { // $ Alert
state = {
p1: '' // $ RelatedLocation
}
static getDerivedStateFromProps_unmodeled(props, state) {
const { p1: p2 } = state
}
}