babel / babel-sublime-snippets

Next generation JavaScript and React snippets for Sublime
https://babeljs.io
262 stars 43 forks source link

Added stateless functional component skeleton #20

Open ezakto opened 8 years ago

ezakto commented 8 years ago

Pretty handy: https://facebook.github.io/react/docs/reusable-components.html#stateless-functions

ezakto commented 8 years ago

@MeKarina what do you mean? Arrow functions are plain javascript. If your env supports export or classes, it also supports arrow functions, right?

iDVB commented 8 years ago

+1 Be nice to know what people are doing now in the absence of this. (other then manual typing) Another snippet lib?

MeKarina commented 8 years ago

both r correct n im not sure which better...

what i propose is airbnb style... and look like gain a lot traction...

https://github.com/airbnb/javascript

anyway u dont need cons... this also correct...

export default (props) => <div>Hello {props.name}</div>
grundmanise commented 7 years ago

@MeKarina how about this one?

import React from 'react'

export default ({prop}) => (
   <div><div />
)