[From the Profiler docs](https://reactjs.org/docs/profiler.html#onrender-callback):

> The Profiler requires an onRender function as a prop. React calls this function any time a component within the profiled tree “commits” an update.

However, given:

```jsx
import React from 'react'
import ReactDOM from 'react-dom'

function Counter() {
  const [count, setCount] = React.useState(0)
  const increment = () => setCount(c => c + 1)
  return <button onClick={increment}>{count}</button>
}

function App() {
  return (
    <div>
      <React.Profiler
        id="counter"
        onRender={() => console.log('called')}
      >
        <div>
          Profiled counter
          <Counter />
        </div>
      </React.Profiler>
      <div>
        Unprofiled counter
        <Counter />
      </div>
    </div>
  )
}

ReactDOM.render(<App />, document.getElementById('root'))
```

I'm getting a log when I click on the unprofiled counter.

Reproduction: https://codesandbox.io/s/react-codesandbox-tnff6

Am I misunderstanding this API, or is this a bug?
newWorkInProgress: Fiber,
): Fiber | null {
  if (__DEV__) {
    const returnFiber = oldWorkInProgress.return;
    if (returnFiber === null) {
      throw new Error('Cannot swap the root fiber.');
    }
     
     
    current.alternate = null;
    oldWorkInProgress.alternate = null;
     
    newWorkInProgress.index = oldWorkInProgress.index;
    newWorkInProgress.sibling = oldWorkInProgress.sibling;
    newWorkInProgress.return = oldWorkInProgress.return;
    newWorkInProgress.ref = oldWorkInProgress.ref;
     
    if (oldWorkInProgress === returnFiber.child) {
      returnFiber.child = newWorkInProgress;
    } else {
      let prevSibling = returnFiber.child;
      if (prevSibling === null) {
        throw new Error('Expected parent to have a child.');
      }
      while (prevSibling.sibling !== oldWorkInProgress) {
        prevSibling = prevSibling.sibling;
        if (prevSibling === null) {
          throw new Error('Expected to find the previous sibling.');
        }
      }