See this example: https://github.com/facebook/react/issues/11508#issuecomment-345464797.

I think it probably reflects a misunderstanding of how props and state work, and we should detect and warn if we see this.
state = {
        value: 0,
      };
      static getDerivedStateFromProps(nextProps, prevState) {
        return {
          value: prevState.value + 1,
        };
      }
      getSnapshotBeforeUpdate(prevProps, prevState) {
        log.push(
          `getSnapshotBeforeUpdate() prevProps:${prevProps.value} prevState:${
            prevState.value
          }`,
        );
        return 'abc';
      }
      componentDidUpdate(prevProps, prevState, snapshot) {