Closed c0debreaker closed 9 years ago
"name"
must be a string not an array. react_componentDidMount_(class).sublime-snippet
should just work out-of-the-box. However, it's scoped to only work inside a class body. react_wrap.sublime-snippet
does need a keybinding (or you can use it without one via the command palette). You first need to select the thing you want wrapped in a component, and then run the snippet.
Would that mean that I will have 2 entries? How about this?
{
"keys": ["ctrl+shift+,"],
"command": "insert_snippet",
"args": {
"name": "Packages/Babel Snippets/react_wrap.sublime-snippet"
}
},
{
"command": "insert_snippet",
"args": {
"name": "Packages/Babel Snippets/react_componentDidMount_(class).sublime-snippet"
}
}
Disregard my question, the cdm works now :D Thank you for mentioning class. That helped a lot!!!
so I added this to my key binding