```js
function Editor({ data: { page } }: EditorProps) {
  if (page == null) throw Error('missing page data in editor')
  const [editorValue, setEditorValue] = useState(() => {
}
```

I believe this should be a valid case, because throw. 
return {
    message:
      `React Hook "${hook}" may be executed more than once. Possibly ` +
      'because it is called in a loop. React Hooks must be called in the ' +
      'exact same order in every component render.',
  };
}
function functionError(hook, fn) {
  return {
    message:
      `React Hook "${hook}" is called in function "${fn}" which is neither ` +
      'a React function component or a custom React Hook function.',
  };
}
function genericError(hook) {
  return {
    message:
      `React Hook "${hook}" cannot be called inside a callback. React Hooks ` +
      'must be called in a React function component or a custom React ' +
      'Hook function.',
  };
}