-
Notifications
You must be signed in to change notification settings - Fork 446
rafc syntax error bugfix #41
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
Conversation
Actually I think there is no such possibility to name export default
component.
I think it should be
export default () => { <div /> }
Ah yes, you're correct.
I'm open to discussion on this.
I updated the PR to remove rafc
as creating a component using an Anonymous function is not a good practice and difficult to debug in the Browser dev tools. Not having a name makes the component tough to identify in the dev tools.
The rafce
snippet should always be the preferred snippet to use in this case.
### `rafce`
import React from 'react'
const 1ドル = () => {
return <div>0ドル</div>
}
export default 1ドル
Thoughts @dsznajder?
I would link them together. To not remove the current one, some people might use it, just rafc
and rafce
would be the same snippet.
8add7a5
to
8038a99
Compare
Good idea @dsznajder.
rafc
and rafce
snippets are now linked together.
@SeanGroff Thanks, I will release this in version 1.9.2
export default const FILENAME
is a syntax error.Changed to
export default FILENAME
In the Snippets descriptions I corrected the Anonymous function terminology to Arrow Function since these are not anonymous functions.
Let me know if you'd like any changes :)