Skip to content

Bug: Handling of symbols when used as deps incorrectly to create error message results in an unrelated TypeError: Cannot convert a Symbol value to a string #19848

@leidegre

Description

@leidegre

React version: 16.3.1

Steps To Reproduce

  1. Click the button in this Code Sandbox https://codesandbox.io/s/blissful-sun-e0lle?file=/src/App.js

The current behavior

The wrong error is generated

The expected behavior

An error should still be generated but the error message should be correct. The problem is that if you do [Symbol('...')].join(',') JavaScript will freak out which is what happens if you put symbols incorrectly in the deps to hooks.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions