You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
414 B

import React from 'react';
// highlight-next-line
import polyfill from 'react-lifecycles-compat';
class ExampleComponent extends React.Component {
// highlight-next-line
static getDerivedStateFromProps(
nextProps,
prevState
) {
/* ... */
}
}
// Polyfill your component to work with older versions of React:
// highlight-next-line
polyfill(ExampleComponent);
export default ExampleComponent;