Skip to content

Commit 227b932

Browse files
committed
refactor(highlight-code): add UNSAFE prefix for lifecycle methods
Refs #7497
1 parent 305f7c3 commit 227b932

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/components/highlight-code.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ export default class HighlightCode extends Component {
4242
}
4343
}
4444

45-
componentDidMount() {
45+
UNSAFE_componentDidMount() {
4646
[this.#syntaxHighlighter, this.#pre]
4747
.map(element => element?.addEventListener("mousewheel", this.preventYScrollingBeyondElement, { passive: false }))
4848
}
4949

50-
componentWillUnmount() {
50+
UNSAFE_componentWillUnmount() {
5151
[this.#syntaxHighlighter, this.#pre]
5252
.map(element => element?.removeEventListener("mousewheel", this.preventYScrollingBeyondElement))
5353
}

0 commit comments

Comments
 (0)