Skip to content

Simplify import statement for useCounter#4265

Open
dafydddev wants to merge 1 commit intofullstack-hy2020:sourcefrom
dafydddev:patch-2
Open

Simplify import statement for useCounter#4265
dafydddev wants to merge 1 commit intofullstack-hy2020:sourcefrom
dafydddev:patch-2

Conversation

@dafydddev
Copy link
Copy Markdown
Contributor

I may be missing something, so feel free to turned this down. However, if you're exporting something as the default...

export default useCounter

Then my understanding is that you don't need to import that thing as a named import

import { useCounter } from '../hooks/useCounter'

You can instead just use

import useCounter from '../hooks/useCounter'

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.

1 participant