vscode-react-javascript-snippets
vscode-react-javascript-snippets copied to clipboard
Snippets not working in .jsx files (anfn)
When using "anfn"-> tab inside the brackets "{}" anywhere in the jsx component return statement, nothing happens (filename xyz.jsx).
return (
..........
<IconButton
color="inherit"
sx={{ ml: 1 }}
onClick={ () => {} } // wanted result
>
<IconButton
color="inherit"
sx={{ ml: 1 }}
onClick={anfn } // actual result
>
)
VSCode: 1.74.2 ES7+ React/Redux/React-Native snippets: v4.4.3 (12/25/2022,)
In case of conflicts VScode config: (I tried a hale mary by adding the config array manually and adding html)
{
"workbench.colorTheme": "Ubuntu Color VSCode Deep Dark",
"workbench.iconTheme": "material-icon-theme",
"files.autoSave": "afterDelay",
"editor.fontSize": 16,
"editor.fontWeight": "normal",
"explorer.confirmDelete": false,
"workbench.startupEditor": "none",
"emmet.includeLanguages": {
"vue-html": "html",
"javascript": "javascriptreact"
},
"redhat.telemetry.enabled": false,
"rainbowTags.allowEverywhere": true,
"eslint.format.enable": true,
"auto-rename-tag.activationOnLanguage": [
"*"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.exclude": {
"**/.git": false,
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"git.enableSmartCommit": true,
"totalTypeScript.hideAllTips": false,
"totalTypeScript.hideBasicTips": false,
"reactSnippets.settings.languageScopes": "typescript,typescriptreact,javascript,javascriptreact,html",
}
The reason for this is the vscode built-in extension TypeScript and JavaScript Language Features, I'm looking for a fix
I found the same problem with this, hope will fix it soon
Meanwhile...
You can search through snippets with ES7 snippet search command which can be run with CMD + Shift + P or just use CMD + Shift + R (CTRL + ALT + R for Windows & Linux) keybinding.