Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ice-chillios merged 1 commit into r5n-labs:master from SeanGroff:master
Nov 30, 2018
Merged

rafc syntax error bugfix #41

ice-chillios merged 1 commit into r5n-labs:master from SeanGroff:master
Nov 30, 2018

Conversation

Copy link
Contributor

@SeanGroff SeanGroff commented Nov 29, 2018

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 :)

Copy link
Member

Actually I think there is no such possibility to name export default component.

I think it should be

export default () => {
 <div />
}
SeanGroff reacted with thumbs up emoji

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

Good idea @dsznajder.

rafc and rafce snippets are now linked together.

Copy link
Member

@SeanGroff Thanks, I will release this in version 1.9.2

@ice-chillios ice-chillios merged commit bb8dfa9 into r5n-labs:master Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /