-
Notifications
You must be signed in to change notification settings - Fork 132
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 component' syntax should be removed from 'rcc' snippet #8
Comments
Thanks for the feedback OshotOkill. Regarding the default action of exporting the component with Now about a snippet for a constructor that except props contains also the context is really easy to add. I didn't do it in advance as context is an advance feature and it's usage is discouraged actually but I am happy to add it. I guess that |
Yeah only a single component per file is one of the best practice in React/Redux while not every one intends to implement it, whether they don't have a distinct structure in mind to export which component at the beginning or they just tend to export a component but nested with others, and with that, we have to scroll down to the end line of the file to delete unnecessary As to add
Though |
Thanks for the input. I would prefer not to change the behavior of the existing snippet Now about context constructor parameter I created #9 |
Yeah Thanks and forgive my wayward requirements. |
Implemented in the latest version 0.4.0 |
A normal React component is not always be the one which should be exported, so
rcc
snippet should only create a class withoutexport default component
syntax and instead replace it withrcced
or something else.By the way it would be better if 'con' snippet creates
constructor(props, context)
rather thanconstructor(props)
.Thank you for founding this convenient extension, I believe both of these changes are not difficult to implement, right?
The text was updated successfully, but these errors were encountered: