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

export default function #34

Open
LauraK0 opened this issue Mar 8, 2023 · 1 comment
Open

export default function #34

LauraK0 opened this issue Mar 8, 2023 · 1 comment

Comments

@LauraK0
Copy link

LauraK0 commented Mar 8, 2023

Have you considered making your functions more concise?

GoTH code:

function Home() {
	return <div>Home page</div>
}

export default Home

Slightly more concise:

export default function Home() {
      return <div>Home page</div>
}
@ko-karol
Copy link
Contributor

ko-karol commented Mar 9, 2023

I always thought this too, but in the end I decided that it would make sense to always find the default exported function at the end of the file. What happens if we, for example, have multiple functions in a file? Would prefer it concise like you but trying another way with this project.

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

No branches or pull requests

2 participants