jeantimex / react-sublime-snippet

Save time in writing React codes
MIT License
103 stars 24 forks source link

Functional Component formatting #1

Closed vladinator1000 closed 8 years ago

vladinator1000 commented 8 years ago

Hi there, great job on this, I'm really digging it!

I was wondering if there's a way to customise the functional component in this format, rather than multiple lines? It's just a personal preference of mine.

const Component = ({ className, }) => {
    return (

    );
};
jeantimex commented 8 years ago

@Sounds good @savovs! If there's just one prop, then make it one-liner seems cleaner. Thanks for your suggestion, I will put this to the next release.

vladinator1000 commented 8 years ago

Awesome, it's not a deal breaker, but for some reason it breaks the colour codingin sublime as well.

jeantimex commented 8 years ago

In terms of the color issue, it might be to do with the syntax package. I've committed the change to make the prop one-liner. Going to add some more useful snippets, will make a new release soon. Thanks for your support mate!

jeantimex commented 8 years ago

v3.0.2 is released, it includes the change to make the functional component cleaner. :)