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

[Repo maintenance]: use named import when working with React #259

Open
marcalexiei opened this issue Dec 24, 2024 · 0 comments
Open

[Repo maintenance]: use named import when working with React #259

marcalexiei opened this issue Dec 24, 2024 · 0 comments
Assignees
Labels
repo maintenance linting, fs organization, that sort of stuff typescript Requires typescript knowledge

Comments

@marcalexiei
Copy link
Member

Style: useState and useEffect are imported via named import while all context functions are prefixed with React..
I think we should be more consistent.
I usually prefer importing React and prefix all with React. (also properties which starts with React. It's redundant, but at least the style is consistent on all files).
There are types like ElementType or handlers (like MouseEventHandler, ...) that cannot be associated with React when used without React.

I'd always use named imports.

Originally posted by @marcalexiei and @Valerioageno in #256 (comment)

@marcalexiei marcalexiei self-assigned this Dec 24, 2024
@marcalexiei marcalexiei added repo maintenance linting, fs organization, that sort of stuff typescript Requires typescript knowledge labels Dec 24, 2024
@marcalexiei marcalexiei moved this to Ready in Road to V1 Dec 24, 2024
@marcalexiei marcalexiei changed the title [Repo maintenance ]: use named import when working with React [Repo maintenance]: use named import when working with React Dec 24, 2024
@marcalexiei marcalexiei moved this from Ready to Backlog in Road to V1 Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repo maintenance linting, fs organization, that sort of stuff typescript Requires typescript knowledge
Projects
Status: Backlog
Development

No branches or pull requests

1 participant