Vscodeextension Reactsnippets
This project is a extensions for Visual Studio Code that provides to itยดs user React code snippets ๐
README
<h1 align="center">
</h1>
<h1 align="center">React Snippets for VS Code!</h1>
Table of Contents
About this project
This project aims to help React JS (and Next JS) developers by providing useful code snippets for those who are
tired of writing every day the same code structure ๐ด๐ป
<h1 align="center">
</h1>
Usage
This extension provides you some snippets that will gain some time for you. Including
Function Components declaration - with and without type - Hooks - including ContextAPI - Unit Test structures
and Next JS SSR and SSG functions declarations.
Supported Languages
- JavaScript (.js)
- TypeScript (.ts)
- JavaScript React (.jsx)
- TypeScript React (.tsx)
Snippets
๐The snippet result can differ depending whether you are in a Typescript or Javascript file because some snippets come with props declaration.
when file extension is (.ts) or (.tsx)
| Shortcut | Result |
|---|---|
!ef โ |
Creates an function component with simple export |
!edf โ |
Creates a function component with default export |
!rcd โ |
Creates a context and export its provider |
!rue โ |
Declares useEffect |
!rus โ |
Declares useState |
!tcr โ |
Unit test structure that renders your component |
!tcrcp โ |
Unit test structure that renders your component with Context Provider |
!tcrrp โ |
Unit test structure that renders your component with Redux Provider |
!nssg โ |
Declares Next JS getStaticProps function |
!nssr โ |
Declares Next JS getServerSideProps function |
License
Distributed under MIT License. See LICENSE to more information's.
Contact
If you have any doubt or suggestion, fell free to contact me ๐๐ฒ
Fernanda Kipper - Github - [email protected]
Enjoy!
