I reread your post this morning. It kinda sounds like you’re talking about snippets.
Here’s a couple I made for VSC. It really doesn’t get much easier than this.
{
"React Functional Component": {
"prefix": "component",
"scope": "typescriptreact",
"body": [
"import React, { FunctionComponent } from 'react'",
"",
"import styles from './styles.module.scss'",
"",
"interface ${TM_DIRECTORY/^.+\\/(.*)$/$1/}Props {}",
"",
"const ${TM_DIRECTORY/^.+\\/(.*)$/$1/}: FunctionComponent<${TM_DIRECTORY/^.+\\/(.*)$/$1/}Props> = () => <div />",
"",
"export default ${TM_DIRECTORY/^.+\\/(.*)$/$1/}",
""
]
}
}
and
{
"React Functional Component": {
"prefix": "container",
"scope": "typescriptreact",
"body": [
"import React, { FunctionComponent } from 'react'",
"import { connect } from 'react-redux'",
"import { AnyAction } from 'redux'",
"import { ThunkDispatch } from 'redux-thunk'",
"",
"import { AppState } from '../reducers'",
"",
"interface ${TM_FILENAME_BASE/^.+\\/(.*)$/$1/}Props {}",
"",
"const ${TM_FILENAME_BASE/^.+\\/(.*)$/$1/}: FunctionComponent<${TM_FILENAME_BASE/^.+\\/(.*)$/$1/}Props> = () => <div />",
"",
"const mapStateToProps = (state: AppState) => ({",
"\tx: state.x.y,",
"})",
"",
"const mapDispatchToProps = (",
"\tdispatch: ThunkDispatch<AppState, void, AnyAction>",
") => ({",
"\tx: () => dispatch(null),",
"})",
"",
"export default connect(",
"\tmapStateToProps,",
"\tmapDispatchToProps",
")(${TM_FILENAME_BASE/^.+\\/(.*)$/$1/})",
""
]
}
}