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

Missing displayName on Components #2597

Open
dacitto opened this issue Nov 23, 2024 · 1 comment
Open

Missing displayName on Components #2597

dacitto opened this issue Nov 23, 2024 · 1 comment
Assignees

Comments

@dacitto
Copy link
Contributor

dacitto commented Nov 23, 2024

Description

The components in gluestack do not include a displayName, making it challenging to debug and work with them in tools like React Developer Tools. Without displayName, components appear as Anonymous, which affects the developer experience.

Problem Statement

Since I use the ESLint rule react/display-name to enforce best practices, gluestack components trigger errors during linting. This adds unnecessary overhead, requiring me to disable the rule for these components or manually assign displayName to them.

Proposed Solution or API

Add a displayName to all gluestack components.

const Button = () => {
  return <button>Click me</button>;
};
Button.displayName = "Button";

Alternatives

No response

Additional Information

I’d be happy to contribute to resolving this issue.

@Viraj-10
Copy link
Collaborator

Hey @vaibhk20,
We've added the displayName property to all of our components. Could you please let us know which component you're experiencing this issue with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants