babel / babel-sublime-snippets Goto Github PK
View Code? Open in Web Editor NEWNext generation JavaScript and React snippets for Sublime
Home Page: https://babeljs.io
Next generation JavaScript and React snippets for Sublime
Home Page: https://babeljs.io
There are many triggers missing. The only thing that works for me are
rcc
ren
fdn
sst
props
state
The other triggers are not working. What am I missing?
Fyi, this is my Babel Snippets directory - http://i.imgur.com/tnaMFPO.jpg
This repo is missing a license. Without a license, all code is copyright the author and may not be used by anyone else.
Please use something like http://choosealicense.com/ to decide what license to use. I recommend MIT or GPL.
A novel effort by Add a License Please
Snippets will only work if your cursor is above the propTypes definition in a jsx file.
Apparently the propTypes syntax breaks the scope for the snippet parser, my guess is because of the colon + curly braces. Removing the propTypes definition will allow snippets to work anywhere in the class again
As a note, this is in ES6 class syntax
I'm on a mac, using the default keybinding:
{
"keys": ["ctrl+shift+,"],
"command": "insert_snippet",
"args": {
"name": "Packages/Babel Sublime Snippets/react_wrap.sublime-snippet"
}
}
I highlight a jsx and try to press ctrl+shift+, and nothing happens, tried using different combination as well, super+shift+m for example.
Not sure if this is an ST3 bug but any help is much appreciated.
Last update to the Master branch was 18 months ago. No other branches in the repository. No movement visible on important issues, e.g. #28 .
So has this package been abandoned now?
I try to wrap this in a react component:
<div>hello world</div>
I get this:
<div>hello <Component>
<div>hello world</div>
<div>hello </Component>
I'm pretty sure that's not the intended output right?
I'm on dev channel build 3095 and for some reason snippets were not appearing anymore in class files.
I changed the scope from:
<scope>source.js meta.class.js -(meta meta)</scope>
to: (1 more meta)
<scope>source.js meta.class.js -(meta meta meta)</scope>
and now they are re-appearing. I don't know if it's a generalized issue.
It's just me or there is not actual ES6 snippets in this repo? I've spent 10 minutes searching of and could not find any.
I cannot seem to get any snippets to work on my machine. I hit rcc
+ tab and just get a tab. Nothing happens. Am I missing something here?
I want to change the rcc -> to my own convention, how would I do that?
I'd like to suggest an enhancement since a large part of writing React is jsx and we lose a lot of helpful snippets available when writing html with .html snippets.
For example, when writing my render function I would like to be able to write 'div', hit tab, and then get
<div>
{cursor placement}
</div>
Would you consider adopting the standardjs code style for your snippets?
I'd prepare a PR.
so I added this to my key binding
{
"keys": ["ctrl+shift+,"],
"command": "insert_snippet",
"args": {
"name": [
"Packages/Babel Snippets/react_wrap.sublime-snippet",
"Packages/Babel Snippets/react_componentDidMount_(class).sublime-snippet"
]
}
}
There are new life-cycle methods in React.
like getDerivedStateFromProps()
, getSnapshotBeforeUpdate
, componentDidCatch
, componentDidUpdate
with 3 params, so on
Will you add them to list of snippets?
It's been a while since the last commit, are you guys looking for maintainers?
New in React 15.5 is a breaking change where PropTypes
are no longer included within React, and have instead been moved to a separate prop-types package. Dropping the React.
prefix from the PropTypes snippets should do it.
I am trying to use rcc to do a class component but it always trigger the legacy one. Am I missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.