MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / getDerivedStateFromProps

Method getDerivedStateFromProps

src/TabContent.js:15–22  ·  view source on GitHub ↗
(nextProps, prevState)

Source from the content-addressed store, hash-verified

13
14class TabContent extends Component {
15 static getDerivedStateFromProps(nextProps, prevState) {
16 if (prevState.activeTab !== nextProps.activeTab) {
17 return {
18 activeTab: nextProps.activeTab,
19 };
20 }
21 return null;
22 }
23
24 constructor(props) {
25 super(props);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected