Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly convert displayName to string #578

Closed
wants to merge 1 commit into from

Conversation

FabianSellmann
Copy link

A React Elements displayName is not necessarily a string, and Symbols are not automatically converted to strings.

A case where the displayName is a symbol is for example the React.Profiler element.

For reference symbols will throw error:
https://stackoverflow.com/questions/44425974/why-symbols-not-convert-string-implicitly
Same seems to happen for String.concat.

This would just be a simple fail safe change for the case where an elements displayName is a symbol.

An React Elements displayName is not necessarily a string and Symbols are not automatically converted to strings.
@ghost
Copy link

ghost commented Jul 15, 2020

There were the following issues with this Pull Request

  • Commit: 503dcc2
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@clayrisser
Copy link

When you convert a symbol to a string it just says [object Object]

@armandabric
Copy link
Collaborator

The PR #617 improve the support of special component case. I will close this one as it seems stale. If there is still an issue you can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants