Skip to content

capitalize the first character of component name#272

Closed
SyMind wants to merge 222 commits into
r5n-labs:developfrom
SyMind:master
Closed

capitalize the first character of component name#272
SyMind wants to merge 222 commits into
r5n-labs:developfrom
SyMind:master

Conversation

@SyMind
Copy link
Copy Markdown

@SyMind SyMind commented Sep 5, 2022

dsznajder and others added 30 commits June 23, 2017 18:50
* add rfe/rfep/cmmb

* add space before function parentheses

* change mapDispatchToProps

* delet bindActionCreator

* update readme.md

* update readme.md

* fix space between function and  (

* space delete
Added rfc and rfcp to export default function just like rcc and rccp do with export default class
Added missing doc for rfe and rfep
Fixed spacing in rfe
@fahhadalsubaie
Copy link
Copy Markdown

Thank you for saving my time!

"type State = {}",
"",
"export default class ${1:${TM_FILENAME_BASE}} extends Component<Props, State> {",
"export default class ${1:${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}} extends Component<Props, State> {",
Copy link
Copy Markdown

@Yaronglp Yaronglp Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You made a great change, but what would happen if I want to push another snippet? or if I will have another request for changes on the component's name?
I think we can optimize it.
I'm suggesting formatting the component name only in one place and reusing that place.
i.e, use the TM_FILENAME_BASE and capitalize it before using it on the generated.json.
Then you will do all your changes in one place and only once, instead of repeating the logic for every snippet.
what do you say?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.