Skip to content

eslint-plugin-react-hooks #14038

Closed
Closed

Description

@steida
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.

Activity

  1. steida commented on Oct 30, 2018

    @steida
    Author

    Hmm, I just realized throw should not be used for valid business case (GraphQL endpoint was updated). Render nothing (and request app update) is the correct approach.

  2. sophiebits commented on Oct 30, 2018

    @sophiebits
    Collaborator

    I think we shouldn't warn on this.

  3. added 3 commits that reference this issue on Oct 30, 2018
    b38a292
    8c39ca3
    fcd4703
  4. added a commit that references this issue on Oct 31, 2018
    3db8b80
  5. added a commit that references this issue on Jan 23, 2019
    20a96e7
  6. added a commit that references this issue on Jun 25, 2026
    9012a9c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions