Open v1rt opened 8 years ago
Same is the case with me, only below are working
rcc (legacy) rcc (class) fdn sst props state
I am using sublime Build 3083
@v1rt @haani104 try replace default
to something like this
in babel snippets folder .config/sublime-text-3/Packages/Babel Snippets
of triggers which don't work. At least it worked for my rcc trigger.
Component api only work on example: class Test extends React.Component { // here
... // other code },
gdp gis ren scu only work in ({ }), Limited by scope meta. Have fun :).
Basically you have to take a look at scopes for particular snippets that are not working. Example: cdm triggers componentDidMount, but it wasn't working for me. I looked at the snippet files.
There are 2 files for this.
react_componentDidMount.sublime-snippet
The scope for this snippet is defined as
<scope>source.js meta.group.braces.round meta.group.braces.curly -(meta meta meta)</scope>
What it means is that this trigger will only work inside ({})
in any javascript file.
For Eg. Open any JS file , create a block with ({}) and type cdm
inside it and tab, it will create componentDidMount.
reactcomponentDidMount(class).sublime-snippet: This is basically meant to cater to the new style of creating React Components using ES6 class keywords.
Scope for this is:
<scope>source.js meta.class.js -(meta meta)</scope>
It means cdm
trigger will work inside class
in any javascript file(inferred from source.js
)
So tabbing cdm
will work inside any component that is specifically created using the Class
keyword.
Hope this helps in understanding the issue better.
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