function setCurrentRenderingInstance(instance) {
      const prev = currentRenderingInstance;
      currentRenderingInstance = instance;
      currentScopeId = (instance && instance.type.__scopeId) || null;
      return prev;
  }
Note: rendering calls maybe nested. The function returns the parent rendering
instance if present, which should be restored after the render is done:

```js
const prev = setCurrentRenderingInstance(i)
// ...render
setCurrentRenderingInstance(prev)
```