Skip to content

Commit

Permalink
Merge pull request #21 from intljusticemission/master
Browse files Browse the repository at this point in the history
fix: prefix React lifecycle methods with UNSAFE (jquense#1578)
  • Loading branch information
pl2476 authored Feb 4, 2020
2 parents 6ada98e + 7b5a6a7 commit 8a9900d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/BackgroundCells.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BackgroundCells extends React.Component {
this._teardownSelectable()
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.selectable && !this.props.selectable) this._selectable()

if (!nextProps.selectable && this.props.selectable)
Expand Down
2 changes: 1 addition & 1 deletion src/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ class Calendar extends React.Component {
context: this.getContext(this.props),
}
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
this.setState({ context: this.getContext(nextProps) })
}

Expand Down
2 changes: 1 addition & 1 deletion src/DayColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DayColumn extends React.Component {
this.clearTimeIndicatorInterval()
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.selectable && !this.props.selectable) this._selectable()
if (!nextProps.selectable && this.props.selectable)
this._teardownSelectable()
Expand Down
2 changes: 1 addition & 1 deletion src/Month.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MonthView extends React.Component {
}
}

componentWillReceiveProps({ date }) {
UNSAFE_componentWillReceiveProps({ date }) {
this.setState({
needLimitMeasure: !dates.eq(date, this.props.date, 'month'),
})
Expand Down
4 changes: 2 additions & 2 deletions src/TimeGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class TimeGrid extends Component {
this._scrollRatio = null
}

componentWillMount() {
UNSAFE_componentWillMount() {
this.calculateScroll()
}

Expand Down Expand Up @@ -73,7 +73,7 @@ export default class TimeGrid extends Component {
//this.checkOverflow()
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { range, scrollToTime } = this.props
// When paginating, reset scroll
if (
Expand Down
2 changes: 1 addition & 1 deletion src/TimeGutter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class TimeGutter extends Component {
})
}

componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { min, max, timeslots, step } = nextProps
this.slotMetrics = this.slotMetrics.update({ min, max, timeslots, step })
}
Expand Down

0 comments on commit 8a9900d

Please sign in to comment.