Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Optimise code base #36

Closed
sboy99 opened this issue Jan 20, 2023 · 4 comments · Fixed by #50
Closed

Refactor: Optimise code base #36

sboy99 opened this issue Jan 20, 2023 · 4 comments · Fixed by #50
Labels
released todo: later Do the things later on

Comments

@sboy99
Copy link
Member

sboy99 commented Jan 20, 2023

Changes Proposed

  • Rename component files using React naming convention
  • Using FC component instead of simple function tag
@sboy99 sboy99 added the todo: later Do the things later on label Jan 20, 2023
@Aadarsh805
Copy link
Member

Aadarsh805 commented Jan 21, 2023

All the files inside components folder need this change?

@Aadarsh805
Copy link
Member

These are gonna be huge changes, lots of imports will need changes
so let's do it ahead of time, otherwise, it'll become much of a huge work later

@Aadarsh805
Copy link
Member

"Typescript React Function Component": {
    "prefix": "fc",
    "body": [
      "import { FC } from 'react'",
      "",
      "interface ${TM_FILENAME_BASE}Props {",
      "  $1",
      "}",
      "",
      "const $TM_FILENAME_BASE: FC<${TM_FILENAME_BASE}Props> = ({$2}) => {",
      "  return <div>$TM_FILENAME_BASE</div>",
      "}",
      "",
      "export default $TM_FILENAME_BASE"
    ],
    "description": "Typescript React Function Component"
  },

Here's a vscode snippet to crate typescript FC components using emmet

@github-actions
Copy link

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released todo: later Do the things later on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants