-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Getting rid of default exports 💡 #761
Comments
I will soon create a PR for some components then anyone who is willing to take up this issue can follow the same process. cc - @Paarmita , @gittysachin , @Marvin9 |
To ensure better |
Agreed. |
example of I am updating the PR.
|
We will be exporting everything as |
I am also deleting |
I strongly agree with migration to |
Great 👍 |
export const along with |
Sure. Do we need migrate slowly? Or in one PR. |
I will migrate some then you can pick up some :) |
By wrapping component in export const Login: React.FC<LogInProps> = withErrorBoundary(({ logInRequest, studentLoginData, clearPreviousLogin }) => { Solution could be export const Login: React.FC = withErrorBoundary(({ logInRequest, studentLoginData, clearPreviousLogin }: LogInProps) => { However I think It will become cluttered. What do you think? |
@Marvin9 So it is the question of code readability right ? or props definitions are being untracked are causing any trouble to typescript complier. |
Code readability. I would prefer components defined as |
Changed all default exports to constants |
@divyanshu-rawat can I take up the issue, if it is available under gssoc? |
Stale issue message |
Is your feature request related to a problem? Please describe.
Currently we are exporting some components as
default
& some components asconst
.Describe the solution you'd like
Now we plant to completely get rid of default export at all, reason being are stated in the blog attached in additional context.
Describe alternatives you've considered
N.A
Additional context
https://blog.neufund.org/why-we-have-banned-default-exports-and-you-should-do-the-same-d51fdc2cf2ad
The text was updated successfully, but these errors were encountered: